From owner-freebsd-bugs Sun Apr 6 03:40:05 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id DAA14377 for bugs-outgoing; Sun, 6 Apr 1997 03:40:05 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id DAA14341; Sun, 6 Apr 1997 03:40:02 -0700 (PDT) Date: Sun, 6 Apr 1997 03:40:02 -0700 (PDT) Message-Id: <199704061040.DAA14341@freefall.freebsd.org> To: freebsd-bugs Cc: From: Dmitrij Tejblum Subject: Re: bin/3202: shutdown(8) don't work if started from an X Window Manager menu Reply-To: Dmitrij Tejblum Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR bin/3202; it has been noted by GNATS. From: Dmitrij Tejblum To: Joerg Wunsch Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/3202: shutdown(8) don't work if started from an X Window Manager menu Date: Sun, 6 Apr 1997 14:27:34 +0400 (MSD) 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