On (06/11/08 09:53), Neale Pickett wrote:
> To: dwm mail list <dwm@suckless.org>
> From: Neale Pickett <[EMAIL PROTECTED]>
> Subject: Re: [dwm] patch to not reparent children to init
> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)
> Reply-To: dwm mail list <dwm@suckless.org>
> List-Id: dwm mail list <dwm.suckless.org>
> 
> "Donald Chai" <[EMAIL PROTECTED]> writes:
> 
> > On Tue, Nov 4, 2008 at 9:09 AM, Neale Pickett <[EMAIL PROTECTED]> wrote:
> >> Reparenting everything to init with the double-fork is a nightmare on a
> >> many-user machine, especially when I'm logged in more than once.  pstree
> >> becomes useless.  This sets up a SIGCHLD handler and only forks once.
> >> Adds 2 SLOC, but surely there's some reason the double-fork is there that
> >> I'm just missing...
> >
> > If you quit dwm, what happens to any programs that you've launched?
> 
> Nothing, the setsid() call makes children process group leaders so they
> don't receive any of the signals the parent gets.
> 
> > What happens if you suddenly decide to manage all your windows with a
> > different window manager?
> 
> Suddenly all my windows have title bars, there are background menus, and
> I find myself using the mouse a lot ;)
> 
> Given that dwm doesn't come with a facility to launch a new wm, I'm not
> terribly worried about either of these cases.  But here's a function to
> restart dwm or change to a new wm (why would you want to do that?!),
> anyway, so you can try it out for yourself and see what happens:
> 
> void
> restart(const Arg *arg)
> {
>   if (arg->v) {
>     execvp(((char **)arg->v[0]), (char **)arg->v);
>   } else {
>     execlp("dwm", "dwm", NULL);
>   }
> }
> 
> In all seriousness, the only thing this changes for me is making the
> output of pstree useful.  When there are 20 X sessions on the machine
> and I need to kill a stuck firefox, having useful pstree output is super
> handy.  If everything's a child of init, the output is flat, and I have
> to pull out my hair.  Nobody wants that, least of all my head.
> 
> Neale
> 

pkill -u $USER firefox

that's all, no searching pstree etc etc. :)

-- 
Premysl "Anydot" Hruby, http://www.redrum.cz/

Reply via email to