reboot(8) thinks that it started from an interactive shell, and ignore only SIGHUP. It seems that somebody, (xdm ?), when die, kills reboot(8) with some other signal. Fix: May be this is not the best way, but it is simple.
As Dmitrij Tejblum wrote: > >Fix: > > May be this is not the best way, but it is simple. I don't think it's a good fix. If at all, shutdown itself should prevent the signal delivery to reboot(8). After all, shutdown is the program that goes into background, while reboot is a plain foreground program (which i expect to be able to abort using ^C if i hit it quickly after typing the command). Note that you should also get away with something like ... exec "trap 1 2 15 ''; shutdown -h now" in your window manager menu. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
On Sat, 5 Apr 1997, J Wunsch wrote: > I don't think it's a good fix. If at all, shutdown itself should > prevent the signal delivery to reboot(8). After all, shutdown is the > program that goes into background, while reboot is a plain foreground > program (which i expect to be able to abort using ^C if i hit it > quickly after typing the command). Well, second variant: *** src/sbin/shutdown/shutdown.c.orig Sat Mar 29 21:48:33 1997 --- src/sbin/shutdown/shutdown.c Sun Apr 6 13:58:18 1997 *************** *** 199,204 **** --- 199,205 ---- (void)printf("shutdown: [pid %d]\n", forkpid); exit(0); } + setsid(); } #endif openlog("shutdown", LOG_CONS, LOG_AUTH); > > Note that you should also get away with something like > > ... exec "trap 1 2 15 ''; shutdown -h now" > > in your window manager menu. > Probably. But such things cannot be called "user-friendly". Dima
State Changed From-To: open->closed Suggested fix applied in rev 1.8 of shutdown.c.