public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@linux.intel.com>
To: Florian Westphal <fw@strlen.de>
Cc: linux-kernel@vger.kernel.org, gaowanlong@cn.fujitsu.com,
	gregkh@linuxfoundation.org, frank@lichtenheld.de
Subject: Re: regression, bisected: openpty fails from 3.7 onwards without devpts
Date: Thu, 10 Jan 2013 15:50:58 +0000	[thread overview]
Message-ID: <20130110155058.12f66e73@bob.linux.org.uk> (raw)
In-Reply-To: <20130110144626.GA26279@breakpoint.cc>

On Thu, 10 Jan 2013 15:46:26 +0100
Florian Westphal <fw@strlen.de> wrote:

> Frank Lichtenheld discovered that openpty() doesn't work anymore when
> /dev/pts is not present.
> 
> We bisected this down to
> 
> commit bbb63c514a3464342967237a51a21ea8f61ab951
> Author: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> Subject: drivers:tty:fix up ENOIOCTLCMD error handling
> 
> The original program triggering the error was pptpd, but
> the test program below is sufficient:
> ----
> #include <stdio.h>
> #include <pty.h>
> int main(void) {
>  int pty_fd, tty_fd;
>  if (openpty(&pty_fd, &tty_fd, NULL, NULL, NULL) != 0) {
>   perror("openpty");
>   return 1;
>  }
> return 0;
> }
> ----
> [ compile with cc -lutil pty.c -o pty ]
> 
> If devpts is available or above commit reverted openpty works again.

The commit is fairly general - what we need to do here is to figure out
which specific thing trips up openpty so we can put the error on that
back as it was (or find a better way) so it still works.

Can you attach an strace of the working/failing cases without /dev/pts 

Alan


  reply	other threads:[~2013-01-10 15:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 14:46 regression, bisected: openpty fails from 3.7 onwards without devpts Florian Westphal
2013-01-10 15:50 ` Alan Cox [this message]
2013-01-10 16:29   ` Florian Westphal
2013-01-10 17:23     ` Jiri Slaby
2013-01-10 20:13       ` Jiri Slaby
2013-01-10 22:45       ` Alan Cox
2013-01-10 22:51         ` Jiri Slaby
2013-01-11 11:11           ` Jiri Slaby
2013-01-11 12:41             ` Florian Westphal
2013-01-11 12:44               ` Jiri Slaby
2013-01-11 13:18                 ` Alan Cox
2013-01-17 16:29                   ` Greg KH
2013-01-17 16:34                     ` Jiri Slaby

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=20130110155058.12f66e73@bob.linux.org.uk \
    --to=alan@linux.intel.com \
    --cc=frank@lichtenheld.de \
    --cc=fw@strlen.de \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@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