mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Luke-Jr" <luke@dashjr.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: pty tcdrain() bug in 2.6.27 to 2.6.30/current
Date: Wed, 10 Jun 2009 10:51:18 +0100	[thread overview]
Message-ID: <20090610105118.564a53de@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <200906092338.42368.luke@dashjr.org>

> manner. The following test case reproduces the bug, and hangs only on affected 
> kernels. Examination of 2.6.26 and 2.6.27 suggests the ioctl used by tcdrain 
> underwent a rewrite for 2.6.27, and thus fixing this bug is beyond my 
> capabilities at this time.

I don't see a bug at this point

> 	slavefd = open(ptsname(masterfd), O_NOCTTY | O_RDWR);
> 	assert(slavefd != -1);
> 	
> 	assert(sizeof(test) == write(slavefd, test, sizeof(test)));

Queue data to the other end...

> 	assert(!tcdrain(slavefd));

Wait for it to be read, but with nothing reading it.

So it waits as it should.


What is the bug here ?

Alan

      parent reply	other threads:[~2009-06-10  9:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10  4:38 Luke-Jr
     [not found] ` <1244615954.19735.42.camel@marge.simson.net>
2009-06-10  6:53   ` Luke-Jr
2009-06-10  9:51 ` Alan Cox [this message]

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=20090610105118.564a53de@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@dashjr.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

all inboxes | Powered by JetHome®