public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* regression, bisected: openpty fails from 3.7 onwards without devpts
@ 2013-01-10 14:46 Florian Westphal
  2013-01-10 15:50 ` Alan Cox
  0 siblings, 1 reply; 13+ messages in thread
From: Florian Westphal @ 2013-01-10 14:46 UTC (permalink / raw)
  To: linux-kernel; +Cc: gaowanlong, alan, gregkh, frank

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-01-17 16:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 14:46 regression, bisected: openpty fails from 3.7 onwards without devpts Florian Westphal
2013-01-10 15:50 ` Alan Cox
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox