Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Apr 1997 03:40:02 -0700 (PDT)
From:      Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
To:        freebsd-bugs
Subject:   Re: bin/3202: shutdown(8) don't work if started from an X Window Manager menu
Message-ID:  <199704061040.DAA14341@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/3202; it has been noted by GNATS.

From: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
To: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
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
 
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704061040.DAA14341>