Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
80bf2aa
)
we close stdin as well
author
Anselm R.Garbe <
[email protected]
>
Wed, 16 Aug 2006 07:31:41 +0000
(09:31 +0200)
committer
Anselm R.Garbe <
[email protected]
>
Wed, 16 Aug 2006 07:31:41 +0000
(09:31 +0200)
main.c
diff
|
blob
|
history
diff --git
a/main.c
b/main.c
index
545efe9
..
50fb9d7
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-18,11
+18,12
@@
/* static */
static int (*xerrorxlib)(Display *, XErrorEvent *);
/* static */
static int (*xerrorxlib)(Display *, XErrorEvent *);
-static Bool otherwm;
+static Bool otherwm
, readin
;
static void
cleanup()
{
static void
cleanup()
{
+ close(STDIN_FILENO);
while(sel) {
resize(sel, True, TopLeft);
unmanage(sel);
while(sel) {
resize(sel, True, TopLeft);
unmanage(sel);
@@
-146,7
+147,7
@@
sendevent(Window w, Atom a, long value)
void
quit(Arg *arg)
{
void
quit(Arg *arg)
{
- running = False;
+ r
eadin = r
unning = False;
}
/*
}
/*
@@
-176,7
+177,6
@@
main(int argc, char *argv[])
int i, j, xfd;
unsigned int mask;
fd_set rd;
int i, j, xfd;
unsigned int mask;
fd_set rd;
- Bool readin = True;
Window w;
XModifierKeymap *modmap;
XSetWindowAttributes wa;
Window w;
XModifierKeymap *modmap;
XSetWindowAttributes wa;
@@
-279,6
+279,7
@@
main(int argc, char *argv[])
/* main event loop, also reads status text from stdin */
XSync(dpy, False);
procevent();
/* main event loop, also reads status text from stdin */
XSync(dpy, False);
procevent();
+ readin = True;
while(running) {
FD_ZERO(&rd);
if(readin)
while(running) {
FD_ZERO(&rd);
if(readin)