diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-02-08 16:26:43 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-02-08 16:26:43 +0000 |
commit | b23581583145d31b48e8dc836a943c803033eeec (patch) | |
tree | 391f3762e31eb90af5281e8bbd5dea1ae3b201b6 | |
parent | 7942e49aea6d07ee91e76f69470ba1b7fa1347e5 (diff) | |
download | rtmux-b23581583145d31b48e8dc836a943c803033eeec.tar.gz rtmux-b23581583145d31b48e8dc836a943c803033eeec.tar.bz2 rtmux-b23581583145d31b48e8dc836a943c803033eeec.zip |
Don't close fds, so error message appears.
-rw-r--r-- | server.c | 4 | ||||
-rw-r--r-- | tmux.c | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.117 2009-02-08 16:11:26 nicm Exp $ */ +/* $Id: server.c,v 1.118 2009-02-08 16:26:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -151,7 +151,7 @@ server_start(const char *path) * Must daemonise before loading configuration as the PID changes so * $TMUX would be wrong for sessions created in the config file. */ - if (daemon(1, 0) != 0) + if (daemon(1, 1) != 0) fatal("daemon failed"); ARRAY_INIT(&windows); @@ -1,4 +1,4 @@ -/* $Id: tmux.c,v 1.105 2009-02-08 16:11:26 nicm Exp $ */ +/* $Id: tmux.c,v 1.106 2009-02-08 16:26:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -398,7 +398,7 @@ main(int argc, char **argv) } if (buffer_poll(&pfd, cctx.srv_in, cctx.srv_out) != 0) - fatalx("lost server"); + goto out; restart: if (BUFFER_USED(cctx.srv_in) < sizeof hdr) |