summaryrefslogtreecommitdiffstats
path: root/cmd-pipe-pane.c
AgeCommit message (Collapse)Author
2019-03-18Merge branch 'obsd-master'Thomas Adam
2019-03-14Store the time in the format tree rather than passing it around.nicm
2019-03-14Merge branch 'obsd-master'Thomas Adam
2019-03-14Accept 0 time as a shorthand for now to format_expand_time.nicm
2018-11-30Merge branch 'obsd-master'Thomas Adam
2018-11-30Clear PANE_EXITED flag when starting new child process in case the panenicm
has been respawned.
2018-11-19Merge branch 'obsd-master'Thomas Adam
2018-11-19evbuffer_new and bufferevent_new can both fail (when malloc fails) andnicm
return NULL. GitHub issue 1547.
2018-01-17Merge branch 'obsd-master'Thomas Adam
2018-01-16Add -I to pipe-pane to connect pane stdin as well as stdout, suggestednicm
by Kristof Kovacs in GitHub issue 1186.
2017-07-14Merge branch 'obsd-master'Thomas Adam
2017-07-14Because ignore SIGCHLD early, letting signal_del restore it doesn't worknicm
correctly, so set it explicitly back to default (and the others for good measure).
2017-07-12Merge branch 'obsd-master'Thomas Adam
Conflicts: cmd-pipe-pane.c proc.c tmux.c window.c
2017-07-12Block signals between forking and clearing signal handlers (or callingnicm
event_reinit) - if the child gets a signal and fires the libevent signal handler during this period it could write a signal into the parent's signal pipe. GitHub issue 1001 from Aaron van Geffen.
2017-07-12Move signal code into proc.c.nicm
2017-07-03Merge branch 'obsd-master'Thomas Adam
2017-07-03Do not close panes until process has exited and any outstanding datanicm
has been written to the pipe-pane event if there is one. GitHub issue 991.
2017-05-01Merge branch 'obsd-master'Thomas Adam
2017-05-01In order that people can use formats like #D in #() in the status linenicm
and not have to wait for an update when they change pane, we allow commands to run more than once a second if the expanded form changes. Unfortunately this can mean them being run far too often (pretty much continually) when multiple clients exist, because some formats (including #D) will always differ between clients. To avoid this, give each client its own tree of jobs which means that the same command will be different instances for each client - similar to how we have the tag to separate commands for different panes. GitHub issue 889; test case reported by Paul Johnson.
2017-04-22Merge branch 'obsd-master'Thomas Adam
2017-04-22Get rid of the extra layer of flags and cmd_prepare() and just store thenicm
CMD_FIND_* flags in the cmd_entry and call it for the command. Commands with special requirements call it themselves and update the target for hooks to use.
2017-02-03Merge branch 'obsd-master'Thomas Adam
2017-02-03Add a window or pane id "tag" to each format tree and use it to separatenicm
jobs, this means that if the same job is used for different windows or panes (for example in pane-border-format), it will be run separately for each pane.
2016-10-16Merge branch 'obsd-master'Thomas Adam
2016-10-16Mass rename struct cmd_q to struct cmdq_item and related.nicm
2016-10-15Merge branch 'obsd-master'Thomas Adam
2016-10-14Add CMD_AFTERHOOK flag to the easy commands that don't need any special ↵nicm
handling.
2016-10-12Merge branch 'obsd-master'Thomas Adam
Conflicts: format.c osdep-openbsd.c
2016-10-10Add static in cmd-* and fix a few other nits.nicm
2016-01-19Merge branch 'obsd-master'Thomas Adam
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-14Merge branch 'obsd-master'Thomas Adam
2015-12-14Instead of combined flags for -c, -s, -t, split into different setsnicm
using an enum and simplify the parsing code.
2015-12-13Merge branch 'obsd-master'Thomas Adam
2015-12-13Use member names in cmd_entry definitions so I stop getting confusednicm
about the order.
2015-12-13Merge branch 'obsd-master'Thomas Adam
2015-12-13Instead of every command resolving the target (-t or -s) itself, preparenicm
the state (client, session, winlink, pane) for it it before entering the command. Each command provides some flags that tell the prepare step what it is expecting. This is a requirement for having hooks on commands (for example, if you hook "select-window -t1:2", the hook command should to operate on window 1:2 not whatever it thinks is the current window), and should allow some other target improvements. The old cmd_find_* functions remain for the moment but that layer will be dropped later. Joint work with Thomas Adam.
2015-12-11Merge branch 'obsd-master'Thomas Adam
2015-12-11Add cmdq as an argument to format_create and add a format for thenicm
command name (will also be used for more later).
2015-12-08Merge branch 'obsd-master'Thomas Adam
2015-12-08Remove format_create_flags and just pass flags to format_create.nicm
2015-11-18Merge branch 'obsd-master'Thomas Adam
2015-11-18Use __unused rather than rolling our own.nicm
2015-02-06No paths.h on Solaris.Nicholas Marriott
2015-02-06Add format_expand_time and use it instead of status_replace wherenicm
command execution is not needed.
2015-02-01Remove two unused arguments from status_replace.nicm
2014-10-20Instead of setting up the default keys by building the key structnicm
directly with a helper function in the cmd_entry, include a table of bind-key commands and pass them through the command parser and a temporary cmd_q. As well as being smaller, this will allow default bindings to be command sequences which will probably be needed soon.
2013-10-10Remove the barely-used and unnecessary command check() function.nicm
2013-03-24Add a command queue to standardize and simplify commands that call otherNicholas Marriott
commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
2013-03-24Fix error reporting for client commands by adding a flag toNicholas Marriott
cmd_find_client to tell it whether or not to show errors, sometimes it's needed and sometimes not.