dwm-meillo

changeset 302:3b11e32e8d7e

we close stdin as well
author Anselm R.Garbe <arg@10ksloc.org>
date Wed, 16 Aug 2006 09:31:41 +0200
parents 87d1c9978ed2
children 1120bd29a275
files main.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/main.c	Wed Aug 16 09:05:58 2006 +0200
     1.2 +++ b/main.c	Wed Aug 16 09:31:41 2006 +0200
     1.3 @@ -18,11 +18,12 @@
     1.4  /* static */
     1.5  
     1.6  static int (*xerrorxlib)(Display *, XErrorEvent *);
     1.7 -static Bool otherwm;
     1.8 +static Bool otherwm, readin;
     1.9  
    1.10  static void
    1.11  cleanup()
    1.12  {
    1.13 +	close(STDIN_FILENO);
    1.14  	while(sel) {
    1.15  		resize(sel, True, TopLeft);
    1.16  		unmanage(sel);
    1.17 @@ -146,7 +147,7 @@
    1.18  void
    1.19  quit(Arg *arg)
    1.20  {
    1.21 -	running = False;
    1.22 +	readin = running = False;
    1.23  }
    1.24  
    1.25  /*
    1.26 @@ -176,7 +177,6 @@
    1.27  	int i, j, xfd;
    1.28  	unsigned int mask;
    1.29  	fd_set rd;
    1.30 -	Bool readin = True;
    1.31  	Window w;
    1.32  	XModifierKeymap *modmap;
    1.33  	XSetWindowAttributes wa;
    1.34 @@ -279,6 +279,7 @@
    1.35  	/* main event loop, also reads status text from stdin */
    1.36  	XSync(dpy, False);
    1.37  	procevent();
    1.38 +	readin = True;
    1.39  	while(running) {
    1.40  		FD_ZERO(&rd);
    1.41  		if(readin)