diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-05-31 20:04:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-05-31 20:04:15 +0000 |
commit | 5569ff9723fcacb0e0206f02adbb4b85368bc1bf (patch) | |
tree | 76f9b0f74c209069e484a89554b66234ba40452f /window.c | |
parent | abe745f99126838079e8d70318983a3b66356573 (diff) | |
download | rtmux-5569ff9723fcacb0e0206f02adbb4b85368bc1bf.tar.gz rtmux-5569ff9723fcacb0e0206f02adbb4b85368bc1bf.tar.bz2 rtmux-5569ff9723fcacb0e0206f02adbb4b85368bc1bf.zip |
Don't hang when window closes early; also add lots more debugging.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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"); } |