From 9200a0be7a515cd04c1a05d120002c73932cbf98 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 23 Sep 2009 12:03:30 +0000 Subject: 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. --- client.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client.c') diff --git a/client.c b/client.c index ceb054bb..e93272de 100644 --- a/client.c +++ b/client.c @@ -91,6 +91,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) -- cgit v1.2.3