lkml.org 
[lkml]   [1996]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectfunny behaviour of shutdown
Date
From
Hello!

Very long ago, line marked by exclamations was missing
in tty_io.c.

void disassociate_ctty(int on_exit)
{
struct tty_struct *tty = current->tty;
struct task_struct *p;

if (tty) {
!!!!! if (on_exit && tty->driver.type != TTY_DRIVER_TYPE_PTY)
tty_vhangup(tty);
} else {
....

When it was inserted (I forgot patch level number),
my "shutdown" stopped to make any tty output after kill(-1, SIGKILL)

/* now use brute force... */
fprintf(stderr, "KILL..."); <---- It is the last thing that shutdown
outputs.
kill(-1, SIGKILL);
/* turn off accounting now that all procs are gone... */
acct(NULL);
fprintf(stderr, "SYNC..."); <---- It is lost.
sync();

Apparently, its tty has been hunged up. But why?
Is it shutdown wrong? Or is it bug in kernel?

I've just deleted new line 8) and forgot about it,
but recently new check tty->driver.type != TTY_DRIVER_TYPE_PTY
was added, my patch failed and it reminded me about this problem.

May somebody clarify it?

Alexey Kuznetsov.


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