equal
deleted
inserted
replaced
45 if(!shell && !(shell = getenv("SHELL"))) |
45 if(!shell && !(shell = getenv("SHELL"))) |
46 shell = "/bin/sh"; |
46 shell = "/bin/sh"; |
47 |
47 |
48 if(!arg->cmd) |
48 if(!arg->cmd) |
49 return; |
49 return; |
50 /* the double-fork construct avoids zombie processes */ |
50 /* The double-fork construct avoids zombie processes and keeps the code |
|
51 * clean from stupid signal handlers. */ |
51 if(fork() == 0) { |
52 if(fork() == 0) { |
52 if(fork() == 0) { |
53 if(fork() == 0) { |
53 if(dpy) |
54 if(dpy) |
54 close(ConnectionNumber(dpy)); |
55 close(ConnectionNumber(dpy)); |
55 setsid(); |
56 setsid(); |