diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-09-23 12:03:30 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-09-23 12:03:30 +0000 |
commit | 9200a0be7a515cd04c1a05d120002c73932cbf98 (patch) | |
tree | 6e82962815963a9962c1029d7d97898fb0dae98b /client.c | |
parent | 18ea820cb0f1e7d9936c89abf15130e40efc956b (diff) |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |