summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-05-31 20:04:15 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-05-31 20:04:15 +0000
commit5569ff9723fcacb0e0206f02adbb4b85368bc1bf (patch)
tree76f9b0f74c209069e484a89554b66234ba40452f /window.c
parentabe745f99126838079e8d70318983a3b66356573 (diff)
Don't hang when window closes early; also add lots more debugging.
Diffstat (limited to 'window.c')
-rw-r--r--window.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/window.c b/window.c
index 61178610..50a2edc1 100644
--- a/window.c
+++ b/window.c
@@ -1,4 +1,4 @@
-/* $Id: window.c,v 1.35 2008-01-02 19:22:21 nicm Exp $ */
+/* $Id: window.c,v 1.36 2008-05-31 20:04:15 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -169,7 +169,7 @@ window_create(
ws.ws_col = sx;
ws.ws_row = sy;
- switch (forkpty(&fd, NULL, NULL, &ws)) {
+ switch (forkpty(&fd, NULL, NULL, &ws)) {
case -1:
return (NULL);
case 0:
@@ -178,8 +178,9 @@ window_create(
fatal("putenv failed");
}
sigreset();
+ log_debug("started child: cmd=%s; pid=%d", cmd, getpid());
log_close();
-
+
execl(_PATH_BSHELL, "sh", "-c", cmd, (char *) NULL);
fatal("execl failed");
}