changeset 373 | 44a55e6e46bf |
parent 338 | 06438e022f9a |
child 461 | 9d23330a5268 |
372:a9b4077ec058 | 373:44a55e6e46bf |
---|---|
49 if(!shell && !(shell = getenv("SHELL"))) |
49 if(!shell && !(shell = getenv("SHELL"))) |
50 shell = "/bin/sh"; |
50 shell = "/bin/sh"; |
51 |
51 |
52 if(!arg->cmd) |
52 if(!arg->cmd) |
53 return; |
53 return; |
54 /* the double-fork construct avoids zombie processes */ |
|
54 if(fork() == 0) { |
55 if(fork() == 0) { |
55 if(fork() == 0) { |
56 if(fork() == 0) { |
56 if(dpy) |
57 if(dpy) |
57 close(ConnectionNumber(dpy)); |
58 close(ConnectionNumber(dpy)); |
58 setsid(); |
59 setsid(); |