mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08:00
Don't close fds, so error message appears.
This commit is contained in:
parent
7942e49aea
commit
b235815831
4
server.c
4
server.c
@ -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>
|
* 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
|
* Must daemonise before loading configuration as the PID changes so
|
||||||
* $TMUX would be wrong for sessions created in the config file.
|
* $TMUX would be wrong for sessions created in the config file.
|
||||||
*/
|
*/
|
||||||
if (daemon(1, 0) != 0)
|
if (daemon(1, 1) != 0)
|
||||||
fatal("daemon failed");
|
fatal("daemon failed");
|
||||||
|
|
||||||
ARRAY_INIT(&windows);
|
ARRAY_INIT(&windows);
|
||||||
|
4
tmux.c
4
tmux.c
@ -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>
|
* 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)
|
if (buffer_poll(&pfd, cctx.srv_in, cctx.srv_out) != 0)
|
||||||
fatalx("lost server");
|
goto out;
|
||||||
|
|
||||||
restart:
|
restart:
|
||||||
if (BUFFER_USED(cctx.srv_in) < sizeof hdr)
|
if (BUFFER_USED(cctx.srv_in) < sizeof hdr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user