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.
This commit is contained in:
Nicholas Marriott
2009-09-23 12:03:30 +00:00
parent 18ea820cb0
commit 9200a0be7a
6 changed files with 112 additions and 18 deletions

View File

@ -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)