On Fri, Jun 10, 2016 at 09:17:45PM +0200, Mariusz Zaborski wrote: > On Fri, Jun 10, 2016 at 04:47:28PM +0200, Jilles Tjoelker wrote: > > On Wed, Jun 08, 2016 at 02:03:53AM +0000, Mariusz Zaborski wrote: > > > + if (setsid() == -1) > > > + errx(1, "Unable to detach from session");
> > There is an implicit assumption here that stdnull() is only called from > > a process that was forked off from here, since setsid() will not and > > cannot work when called from a process that is already a session leader. > > If the application is running from a shell, this setsid() will exclude > > the process from most signals, including terminal ^C/^\/^Z, kill % and > > hangups. More generally, this might make it more likely for the process > > to hang around indefinitely after the parent is gone. > I'm not sure but if the process descriptor not solve that? > If we close all process descriptor to the process it should die then, so you > need to kill just the process which is using service. Oh, right. For termination this is probably even better since terminating properly may require casper daemons, and for stopping it probably doesn't matter much. For opening files in utilities called from an interactive shell it is probably still bad since it breaks /dev/tty and obscures blocking opens such as fifos. -- Jilles Tjoelker _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"