we close stdin as well

This commit is contained in:
Anselm R.Garbe 2006-08-16 09:31:41 +02:00
parent 80bf2aa559
commit 727449d1e7
1 changed files with 4 additions and 3 deletions

7
main.c
View File

@ -18,11 +18,12 @@
/* static */ /* static */
static int (*xerrorxlib)(Display *, XErrorEvent *); static int (*xerrorxlib)(Display *, XErrorEvent *);
static Bool otherwm; static Bool otherwm, readin;
static void static void
cleanup() cleanup()
{ {
close(STDIN_FILENO);
while(sel) { while(sel) {
resize(sel, True, TopLeft); resize(sel, True, TopLeft);
unmanage(sel); unmanage(sel);
@ -146,7 +147,7 @@ sendevent(Window w, Atom a, long value)
void void
quit(Arg *arg) quit(Arg *arg)
{ {
running = False; readin = running = False;
} }
/* /*
@ -176,7 +177,6 @@ main(int argc, char *argv[])
int i, j, xfd; int i, j, xfd;
unsigned int mask; unsigned int mask;
fd_set rd; fd_set rd;
Bool readin = True;
Window w; Window w;
XModifierKeymap *modmap; XModifierKeymap *modmap;
XSetWindowAttributes wa; XSetWindowAttributes wa;
@ -279,6 +279,7 @@ main(int argc, char *argv[])
/* main event loop, also reads status text from stdin */ /* main event loop, also reads status text from stdin */
XSync(dpy, False); XSync(dpy, False);
procevent(); procevent();
readin = True;
while(running) { while(running) {
FD_ZERO(&rd); FD_ZERO(&rd);
if(readin) if(readin)