lkml.org 
[lkml]   [1996]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: funny behaviour of shutdown
Theodore Y. Ts'o (tytso@MIT.EDU) wrote:
: Yes, I am aware about it. However, I start halt by exec from
^^^^ Note it!
: root shell, so that SIGKILL do not kill session leader (i.e. halt)
: I do not understand why kernel should hang up this terminal.
: Are you sure that it is correct?

: Halt isn't necessarily going to be the session leader for the terminal.
: The session terminal leader is the first process which does not already
: belong to a session (by virtue of calling setsid()) to open a terminal
: which does not belong to a session already.

: The session leader is typically the user's login shell, or getty if
: there isn't a user logged into the terminal yet.

: I suspect you're confusing the difference between process group leader
: and session leader....

I make login at terminal tty1, so that session leader is bash.
Then I make:
# exec halt
Now the only process that has controlling tty (and session leader)
is halt (really it is the same process as bash).
When halt makes kill(-1, SIGKILL), tty1 was hanged up.
It is absurd and it confused me a lot.

You are COMPLETELY right! I've just debugged it more carefully
and found that shutdown forked before kill.
(Why it made it is another question)

So that, the alert was wrong 8)8). I'm sorry.

Alexey Kuznetsov


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