Linux PPP protocol development
 help / color / mirror / Atom feed
From: Arkadiusz Miskiewicz <arekm@pld-linux.org>
To: linux-ppp@vger.kernel.org
Subject: Re: some change in ppp 2.4.3: tcflush failed: Bad file descriptor
Date: Thu, 25 Nov 2004 22:55:44 +0000	[thread overview]
Message-ID: <200411252355.44780.arekm@pld-linux.org> (raw)
In-Reply-To: <200411231157.43347.arekm@pld-linux.org>

On Thursday 25 of November 2004 22:27, Paul Mackerras wrote:
> Arkadiusz Miskiewicz writes:
> > Shouldn't pppd kill old pty "command" before running new one?
>
> pppd will close its side of the pty device, leading to the program
> running on the other side (the script specified in the pty option)
> getting an end-of-file on its standard input.  It should clean up and
> exit when it gets that.
>
> Alternatively you can use a disconnect script to kill it, if your pty
> command is too lame to exit on EOF.

Looking into pppoa code I see that read() of 0 is handled (exit(0) in such 
case). Did anything change between 2.4.2 and 2.4.3 in this area? 2.4.2 causes 
that pppoa terminates properly while 2.4.3 not.

tcflush failed: Bad file descriptor comes from ioctl on -1 descriptor, doesn't 
look correct
4196  ioctl(8, JFFS_PRINT_HASH or PPPIOCGFLAGS, 0xbffff3a0) = 0
4196  ioctl(-1, TCFLSH, 0x2)            = -1 EBADF (Bad file descriptor)
4196  time([1101422552])                = 1101422552
4196  stat64("/etc/localtime",  <unfinished ...>
4555  <... select resumed> )            = 0 (Timeout)
4196  <... stat64 resumed> {st_mode=S_IFREG|0644, st_size–1, ...}) = 0
4555  select(4, [0 3], NULL, NULL, {0, 250} <unfinished ...>
4196  stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size–1, ...}) = 0
4196  stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size–1, ...}) = 0
4196  rt_sigaction(SIGPIPE, {0xb7f0a140, [], 0}, {SIG_IGN}, 8) = 0
4196  send(3, "<28>Nov 25 23:42:32 pppd[4196]: tcflush failed: Bad file 
descriptor\0", 68, 0) = 68

isn't tcflush failing a reason for a pppoa to not terminate?
> Paul.

-- 
Arkadiusz Mi¶kiewicz                    PLD/Linux Team
http://www.t17.ds.pwr.wroc.pl/~misiek/  http://ftp.pld-linux.org/

  parent reply	other threads:[~2004-11-25 22:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-23 10:57 some change in ppp 2.4.3: tcflush failed: Bad file descriptor Arkadiusz Miskiewicz
2004-11-23 16:06 ` James Carlson
2004-11-25 15:44 ` Arkadiusz Miskiewicz
2004-11-25 16:09 ` Arkadiusz Miskiewicz
2004-11-25 21:27 ` Paul Mackerras
2004-11-25 22:55 ` Arkadiusz Miskiewicz [this message]
2004-11-26  0:51 ` Paul Mackerras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200411252355.44780.arekm@pld-linux.org \
    --to=arekm@pld-linux.org \
    --cc=linux-ppp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox