This was my hunch too, glad someone got it before me though.  This
patch fixes the problem with 5.3.  Probably the same with the double-
fork version too.

Jeremy


On Sat 06 Dec 2008 - 11:14PM, yamada yohei wrote:
> I reprodeced this problem with dwm-4.7 and also dwm 5.3.1.
> Neale's spawn() change is not guilty.
> I think that fork() copy fd and pipe survive.
> Please try this patch:
> 
> diff -r 94032e7d3943 dwm.c
> --- a/dwm.c     Sat Dec 06 11:22:30 2008 +0000
> +++ b/dwm.c     Sat Dec 06 22:57:46 2008 +0900
> @@ -1396,6 +1396,7 @@
>                 if(fork() == 0) {
>                         if(dpy)
>                                 close(ConnectionNumber(dpy));
> +                       fclose (stdin);
>                         setsid();
>                         execvp(((char **)arg->v)[0], (char **)arg->v);
>                         fprintf(stderr, "dwm: execvp %s", ((char 
> **)arg->v)[0]);
> 
> -- 
> Yamada Yohei (?$B;3EDMNJ?) <[EMAIL PROTECTED]>
> 

Reply via email to