# HG changeset patch # User Anselm R.Garbe # Date 1155713501 -7200 # Node ID 3b11e32e8d7e0c4063baf32ffd0bd87b31b637b3 # Parent 87d1c9978ed228f10c408576a590ffb917434b1a we close stdin as well diff -r 87d1c9978ed2 -r 3b11e32e8d7e main.c --- a/main.c Wed Aug 16 09:05:58 2006 +0200 +++ b/main.c Wed Aug 16 09:31:41 2006 +0200 @@ -18,11 +18,12 @@ /* static */ static int (*xerrorxlib)(Display *, XErrorEvent *); -static Bool otherwm; +static Bool otherwm, readin; static void cleanup() { + close(STDIN_FILENO); while(sel) { resize(sel, True, TopLeft); unmanage(sel); @@ -146,7 +147,7 @@ void quit(Arg *arg) { - running = False; + readin = running = False; } /* @@ -176,7 +177,6 @@ int i, j, xfd; unsigned int mask; fd_set rd; - Bool readin = True; Window w; XModifierKeymap *modmap; XSetWindowAttributes wa; @@ -279,6 +279,7 @@ /* main event loop, also reads status text from stdin */ XSync(dpy, False); procevent(); + readin = True; while(running) { FD_ZERO(&rd); if(readin)