aboutsummaryrefslogtreecommitdiff
path: root/cmd-run-shell.c
Commit message (Collapse)AuthorAge
* Expand the Id keyword. Tiago Cunha2011-07-09
|
* Sync OpenBSD patchset 855:Tiago Cunha2011-02-15
| | | | | | | | | | | | | | | | | | | Simplify the way jobs work and drop the persist type, so all jobs are fire-and-forget. Status jobs now managed with two trees of output (new and old), rather than storing the output in the jobs themselves. When the status line is processed any jobs which don't appear in the new tree are started and the output from the old tree displayed. When a job finishes it updates the new tree with its output and that is used for any subsequent redraws. When the status interval expires, the new tree is moved to the old so that all jobs are run again. This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands of identical persistent jobs and high memory use (this can still be achieved by adding "sleep 30" but that is much less likely to happen by accident).
* Sync OpenBSD patchset 829:Tiago Cunha2011-01-07
| | | | | | | | | | | | | | | | | | | | | | Clean up and simplify tmux command argument parsing. Originally, tmux commands were parsed in the client process into a struct with the command data which was then serialised and sent to the server to be executed. The parsing was later moved into the server (an argv was sent from the client), but the parse step and intermediate struct was kept. This change removes that struct and the separate parse step. Argument parsing and printing is now common to all commands (in arguments.c) with each command left with just an optional check function (to validate the arguments at parse time), the exec function and a function to set up any key bindings (renamed from the old init function). This is overall more simple and consistent. There should be no changes to any commands behaviour or syntax although as this touches every command please watch for any unexpected changes.
* Sync OpenBSD patchset 741:Tiago Cunha2010-08-09
| | | | | | | | | | | | | | | | | | | | When changing so that the client passes its stdout and stderr as well as stdin up to the server, I forgot one essential point - the tmux server could now be both the producer and consumer. This happens when tmux is run inside tmux, as well as when piping tmux commands together. So, using stdio(3) was a bad idea - if sufficient data was written, this could block in write(2). When that happened and the server was both producer and consumer, it deadlocks. Change to use libevent bufferevents for the client stdin, stdout and stderr instead. This is trivial enough for output but requires a callback mechanism to trigger when stdin is finished. This relies on the underlying polling mechanism for libevent to work with whatever devices to which the user could redirect stdin, stdout or stderr, hence the change to use poll(2) over kqueue(2) for tmux.
* Sync OpenBSD patchset 734:Tiago Cunha2010-07-17
| | | | | | | | | Return the command client return code with MSG_EXIT now that MSG_ERROR and MSG_PRINT are unused. New clients should be compatible with old tmux servers but vice versa may print an error.
* Sync OpenBSD patchset 705:Tiago Cunha2010-06-06
| | | | | | Don't die if the client has been detached when the job finishes, just don't display the output.
* Sync OpenBSD patchset 539:Tiago Cunha2009-11-14
| | | | | | Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the command entry structs and a couple of functions to check/set the flags.
* Sync OpenBSD patchset 493:Tiago Cunha2009-11-08
| | | | | Switch jobs over to use a bufferevent.
* Sync OpenBSD patchset 475:Tiago Cunha2009-11-02
| | | | | | | | | Add a flag for jobs that shouldn't be freed after they've died and use it for status jobs, then only kill those jobs when status-left, status-right or set-titles-string is changed. Fixes problems with changing options from inside #().
* Sync OpenBSD patchset 385:Tiago Cunha2009-10-12
| | | | | Remove a debugging leftover and add copyright.
* Sync OpenBSD patchset 384:Tiago Cunha2009-10-12
| | | | | Switch run-shell over to queue the command in the background like #().
* Sync OpenBSD patchset 335:Tiago Cunha2009-09-20
run-shell command to run a shell command without opening a window, sending stdout to output mode.