Mercurial > aewl
comparison util.c @ 373:44a55e6e46bf 1.1
added a comment to spawn
author | Anselm R. Garbe <arg@10kloc.org> |
---|---|
date | Mon, 28 Aug 2006 08:17:27 +0200 |
parents | 06438e022f9a |
children | 9d23330a5268 |
comparison
equal
deleted
inserted
replaced
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(); |