lkml.org 
[lkml]   [1996]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: PTY feature? or bug?

Apparently, you forgot:

add_wait_queue(&pty->open_wait, &wait);
#ifndef NO_ANK_FIX
current->state = TASK_INTERRUPTIBLE;
#endif
retval = 0;
while (1) {
if (current->signal & ~current->blocked) {
retval = -ERESTARTSYS;
break;
}
/*
* Block until the master is open...
*/
if (tty->link->count &&
!test_bit(TTY_OTHER_CLOSED, &tty->flags))
break;
schedule();
}
current->state = TASK_RUNNING;
remove_wait_queue(&pty->open_wait, &wait);


I'd like to repeat my question.

Are you sure, that it should wait for master open?

All the applications, that I've seen (rlogind, telnetd, emacs, xterm),
open master and only then open slave.

I'd propose return EIO (EAGAIN,....) on the attempt to
open orphaned pty slave. If BSD does not make it, it is
BSD's bug, I believe.

Alexey Kuznetsov.


\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.095 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site