summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-09-23 15:18:56 +0000
committerTiago Cunha <tcunha@gmx.com>2009-09-23 15:18:56 +0000
commit5be3fb86b9225842515f79a611a44d587814bd4c (patch)
tree88f4ef4bc24ee53dad55e025a7aaddbf335aa813 /client.c
parent4dd332c95e0c439ae9532ffa391cd13eb769af01 (diff)
Sync OpenBSD patchset 350:
Support -c like sh(1) to execute a command, useful when tmux is a login shell. Suggested by halex@. This includes another protocol version increase (the last for now) so again restart the tmux server before upgrading.
Diffstat (limited to 'client.c')
-rw-r--r--client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/client.c b/client.c
index 070fae10..87311445 100644
--- a/client.c
+++ b/client.c
@@ -1,4 +1,4 @@
-/* $Id: client.c,v 1.74 2009-09-23 15:00:08 tcunha Exp $ */
+/* $Id: client.c,v 1.75 2009-09-23 15:18:56 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -95,6 +95,8 @@ server_started:
fatal("fcntl failed");
if (fcntl(fd, F_SETFL, mode|O_NONBLOCK) == -1)
fatal("fcntl failed");
+ if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
+ fatal("fcntl failed");
imsg_init(&cctx->ibuf, fd);
if (cmdflags & CMD_SENDENVIRON)