OpenBSD CVS

CVS log for src/usr.bin/tmux/job.c


[BACK] Up to [local] / src / usr.bin / tmux

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.68 / (download) - annotate - [select for diffs], Wed May 15 09:59:12 2024 UTC (3 days, 22 hours ago) by nicm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.67: +23 -10 lines
Diff to previous 1.67 (colored)

Use default-shell for command prompt #() and popups as well

Revision 1.67 / (download) - annotate - [select for diffs], Tue Feb 1 12:05:42 2022 UTC (2 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.66: +2 -3 lines
Diff to previous 1.66 (colored)

Mention that if-shell and #() use /bin/sh.

Revision 1.66 / (download) - annotate - [select for diffs], Sun Oct 24 21:24:17 2021 UTC (2 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.65: +2 -2 lines
Diff to previous 1.65 (colored)

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant.  Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk.  They could all be 0xdeafbeef.
ok millert

Revision 1.65 / (download) - annotate - [select for diffs], Mon Oct 11 10:55:30 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.64: +5 -2 lines
Diff to previous 1.64 (colored)

Add -e flag to set environment for popup, from Alexis Hildebrandt in
GitHub issue 2924.

Revision 1.64 / (download) - annotate - [select for diffs], Tue Oct 5 12:49:37 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.63: +1 -2 lines
Diff to previous 1.63 (colored)

Make send-keys without any arguments send the key it is bound to (if
any). GitHub issue 2904.

Revision 1.63 / (download) - annotate - [select for diffs], Tue Oct 5 12:46:02 2021 UTC (2 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.62: +2 -1 lines
Diff to previous 1.62 (colored)

Separate "very visible" flag from blinking flag, it should not affect
DECSCUSR. GitHub issue 2891.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Aug 13 19:55:11 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.61: +11 -4 lines
Diff to previous 1.61 (colored)

Fill in some other bits on new panes.

Revision 1.61 / (download) - annotate - [select for diffs], Fri Aug 13 19:27:25 2021 UTC (2 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.60: +22 -1 lines
Diff to previous 1.60 (colored)

Add menu options to convert a popup into a pane.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Mar 2 10:56:45 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.59: +32 -16 lines
Diff to previous 1.59 (colored)

Drop support for popups where the content is provided directly to tmux
(which does not have many practical uses) and only support running a
program in the popup. display-popup is now simpler and can accept
multiple arguments to avoid escaping problems (like the other commands).

Revision 1.59 / (download) - annotate - [select for diffs], Fri Feb 19 09:09:16 2021 UTC (3 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.58: +5 -5 lines
Diff to previous 1.58 (colored)

Check return value of chdir() to stop a silly warning with some
compilers, GitHub issue 2573.

Revision 1.58 / (download) - annotate - [select for diffs], Sat May 16 15:24:28 2020 UTC (4 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.57: +8 -1 lines
Diff to previous 1.57 (colored)

Add 'e' key in buffer mode to open the buffer in an editor.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Mar 24 08:09:44 2020 UTC (4 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.56: +20 -1 lines
Diff to previous 1.56 (colored)

Add support for overlay popup boxes to show text or output temporarily
above the normal layout. These work similarly to menus and are created
with the display-popup command.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Mar 19 13:43:18 2020 UTC (4 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.55: +52 -32 lines
Diff to previous 1.55 (colored)

Add a flag to run a background process in a pty as well, not used for
anything yet.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:05 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Nov 19 13:35:41 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.53: +3 -1 lines
Diff to previous 1.53 (colored)

evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Oct 28 16:10:02 2018 UTC (5 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Do not printf NULL.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Sep 27 07:43:18 2018 UTC (5 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.51: +2 -1 lines
Diff to previous 1.51 (colored)

Use same working directory rules for jobs as new windows rather than
always starting in home, GitHub issue 1488.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Aug 23 18:39:12 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.50: +3 -2 lines
Diff to previous 1.50 (colored)

all_jobs can be static.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Aug 23 15:45:05 2018 UTC (5 years, 8 months ago) by nicm
Branch: MAIN
Changes since 1.49: +99 -3 lines
Diff to previous 1.49 (colored)

Move job struct into job.c.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Mar 8 08:09:10 2018 UTC (6 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.48: +3 -2 lines
Diff to previous 1.48 (colored)

Add a missing client-detached hook when the server shuts down, and do
not exit until jobs started from run-shell/if-shell have finished (add a
job flags member and a flag to indicate other jobs). GitHub issue 1245.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jul 14 18:49:07 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

Because ignore SIGCHLD early, letting signal_del restore it doesn't work
correctly, so set it explicitly back to default (and the others for good
measure).

Revision 1.47 / (download) - annotate - [select for diffs], Wed Jul 12 10:04:51 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.46: +8 -3 lines
Diff to previous 1.46 (colored)

Block signals between forking and clearing signal handlers (or calling
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.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Jul 12 09:24:17 2017 UTC (6 years, 10 months ago) by nicm
Branch: MAIN
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

Move signal code into proc.c.

Revision 1.45 / (download) - annotate - [select for diffs], Wed May 31 17:56:48 2017 UTC (6 years, 11 months ago) by nicm
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Style and spacing nits.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Apr 25 15:35:10 2017 UTC (7 years ago) by nicm
Branch: MAIN
Changes since 1.43: +7 -2 lines
Diff to previous 1.43 (colored)

Do not update TERM into config file parsing has finished.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Apr 20 09:20:22 2017 UTC (7 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.42: +34 -17 lines
Diff to previous 1.42 (colored)

If a #() command doesn't exit, use its most recent line of output (it
must be a full line). Don't let it redraw the status line more than once
a second.

Requested by someone about 10 years ago...

Revision 1.42 / (download) - annotate - [select for diffs], Thu Mar 9 17:02:38 2017 UTC (7 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.41: +2 -7 lines
Diff to previous 1.41 (colored)

Move server_fill_environ into environ.c and move some other common code
into it.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Oct 10 21:29:23 2016 UTC (7 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.40: +5 -5 lines
Diff to previous 1.40 (colored)

Loads more static, except for cmd-*.c and window-*.c.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Jan 19 15:59:12 2016 UTC (8 years, 4 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

I no longer use my SourceForge address so replace it.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Nov 18 14:27:44 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.38: +4 -3 lines
Diff to previous 1.38 (colored)

Use __unused rather than rolling our own.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Oct 31 08:13:58 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.37: +7 -4 lines
Diff to previous 1.37 (colored)

Because pledge(2) does not allow us to pass directory file descriptors
around, we can't use file descriptors for the working directory because
we will be unable to pass it to a privileged process to tell it where to
read or write files or spawn children. So move tmux back to using
strings for the current working directory. We try to check it exists
with access() when it is set but ultimately fall back to ~ if it fails
at time of use (or / if that fails too).

Revision 1.37 / (download) - annotate - [select for diffs], Wed Oct 28 09:51:55 2015 UTC (8 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.36: +10 -10 lines
Diff to previous 1.36 (colored)

Like options, move the environ struct into environ.c.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jun 17 16:44:49 2015 UTC (8 years, 11 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.35: +9 -6 lines
Diff to previous 1.35 (colored)

Use an explicit job state instead of avoid closing our side of the
socketpair and setting it to -1 to mark when the other side is
closed. This avoids closing it while the libevent bufferevent still has
it (it could try to add it to the polled set which some mechanisms don't
like). Fixes part a problem reported by Bruno Sutic.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Apr 24 22:19:36 2015 UTC (9 years ago) by nicm
Branch: MAIN
Changes since 1.34: +5 -2 lines
Diff to previous 1.34 (colored)

Set working directory for run-shell and if-shell.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Oct 20 23:27:14 2014 UTC (9 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Tidy up some includes.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Apr 14 22:27:30 2014 UTC (10 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.32: +3 -1 lines
Diff to previous 1.32 (colored)

Don't leak socketpair file descriptors if fork fails. Spotted by Balazs
Kezes.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Oct 10 12:35:31 2013 UTC (10 years, 7 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Use format_get_command() and some spacing tweaks.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Apr 17 08:41:41 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

%zu format for size_t.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Apr 10 12:20:35 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

Set EV_WRITE for jobs or run/if-shell jobs can hang. From Chris Johnsen.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Mar 25 11:43:01 2013 UTC (11 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.28: +28 -8 lines
Diff to previous 1.28 (colored)

Extend jobs to support writing and use that for copy-pipe instead of
popen, from Chris Johnsen.

Revision 1.28 / (download) - annotate - [select for diffs], Fri Mar 22 10:31:22 2013 UTC (11 years, 2 months ago) by nicm
Branch: MAIN
Changes since 1.27: +1 -2 lines
Diff to previous 1.27 (colored)

No more lint means no more ARGSUSED.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jul 10 11:53:01 2012 UTC (11 years, 10 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.26: +4 -3 lines
Diff to previous 1.26 (colored)

xfree is not particularly helpful, remove it. From Thomas Adam.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jan 29 02:22:11 2012 UTC (12 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Call bufferevent_free before closing file descriptor associated with it
or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers
in a twist. From Dylan Alex Simon.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jan 26 01:54:56 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.24: +67 -140 lines
Diff to previous 1.24 (colored)

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

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 26 00:11:47 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)

Use LIST_* not SLIST_*.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Jan 23 11:03:43 2011 UTC (13 years, 3 months ago) by nicm
Branch: MAIN
Changes since 1.22: +11 -3 lines
Diff to previous 1.22 (colored)

Set $TMUX without the session when background jobs are run.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jan 8 01:52:36 2011 UTC (13 years, 4 months ago) by nicm
Branch: MAIN
Changes since 1.21: +3 -6 lines
Diff to previous 1.21 (colored)

Move all calls to fcntl(...O_NONBLOCK) into a function and clear the
flag on the stdio file descriptors before closing them (fixes things
like "tmux ls && cat").

Revision 1.21 / (download) - annotate - [select for diffs], Sat Oct 16 08:31:55 2010 UTC (13 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Aug 19 18:29:01 2010 UTC (13 years, 9 months ago) by nicm
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Do not call event_del() for signals after fork(), just use sigaction()
directly instead - calling libevent functions after fork() w/o
event_reinit() is a bad idea, even if in this case it was harmless.

Revision 1.19 / (download) - annotate - [select for diffs], Tue May 4 17:28:16 2010 UTC (14 years ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

Put this back in with the initialisation in the right order.

Revision 1.18 / (download) - annotate - [select for diffs], Tue May 4 08:48:06 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.17: +1 -1 lines
Diff to previous 1.17 (colored)

Revert last change, it appears to be broken somehow.

Revision 1.17 / (download) - annotate - [select for diffs], Mon May 3 16:06:32 2010 UTC (14 years ago) by nicm
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

Make signal handler setup/teardown two common functions instead of six,
and reset SIGCHLD after fork to fix problems with some shells. From
Romain Francois.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Apr 4 19:02:09 2010 UTC (14 years, 1 month ago) by nicm
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

Run job commands explicitly in the global enviroment (which can be
modified with setenv -g) rather than with the environment tmux started
with.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 24 19:13:38 2010 UTC (14 years, 2 months ago) by nicm
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Typo fix from Tim van der Molen.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 3 22:50:10 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.13: +4 -4 lines
Diff to previous 1.13 (colored)

Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying
colours...

Revision 1.13 / (download) - annotate - [select for diffs], Thu Nov 26 21:37:13 2009 UTC (14 years, 5 months ago) by nicm
Branch: MAIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (colored)

Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
the rest to reduce lint output.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Nov 4 21:10:49 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.11: +13 -6 lines
Diff to previous 1.11 (colored)

Add back JOB_PERSIST checks that got lost.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Nov 4 21:04:43 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.10: +41 -12 lines
Diff to previous 1.10 (colored)

Switch jobs over to use a bufferevent.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Nov 4 20:50:11 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.9: +4 -2 lines
Diff to previous 1.9 (colored)

Initial changes to move tmux to libevent.

This moves the client-side loops are pretty much fully over to event-based only
(tmux.c and client.c) but server-side (server.c and friends) treats libevent as
a sort of clever poll, waking up after every event to run various things.

Moving the server stuff over to bufferevents and timers and so on will come
later.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Nov 1 23:20:37 2009 UTC (14 years, 6 months ago) by nicm
Branch: MAIN
Changes since 1.8: +14 -4 lines
Diff to previous 1.8 (colored)

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 #().

Revision 1.8 / (download) - annotate - [select for diffs], Wed Oct 21 18:20:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.7: +1 -14 lines
Diff to previous 1.7 (colored)

Remove unused function.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Oct 21 07:24:23 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.6: +8 -8 lines
Diff to previous 1.6 (colored)

Getting the read and write ends of the pipe the right way round is usually
recommended. DOH.

Revision 1.6 / (download) - annotate - [select for diffs], Tue Oct 20 22:15:32 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.5: +7 -7 lines
Diff to previous 1.5 (colored)

Sort out stdout before stdin/stderr in case the stdout side of the pipe got one
of their fds.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Oct 11 08:58:05 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Switch run-shell over to queue the command in the background like #().

Revision 1.4 / (download) - annotate - [select for diffs], Sun Oct 11 07:30:07 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.3: +6 -2 lines
Diff to previous 1.3 (colored)

There isn't much point in having a free function if it isn't used.

Also allow a NULL tree.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Oct 11 07:20:16 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.2: +4 -1 lines
Diff to previous 1.2 (colored)

Collect status from dead jobs and don't invoke the callback until both
all input (the socket is closed) and status is available.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Oct 10 18:42:14 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN
Changes since 1.1: +7 -1 lines
Diff to previous 1.1 (colored)

Put all jobs on a global all_jobs list and use that in server.c instead of
running through all the clients.

Revision 1.1 / (download) - annotate - [select for diffs], Sat Oct 10 15:03:01 2009 UTC (14 years, 7 months ago) by nicm
Branch: MAIN

Rather than running status-left, status-right and window title #() with popen
immediately every redraw, queue them up and run them in the background,
starting each once every status-interval. The actual status line uses the
output from the last run.

This brings several advantages:

- tmux itself may be called from inside #() without causing the server to hang;
- likewise, sleep or similar doesn't cause the server to block;
- commands aren't run excessively often when redrawing;
- commands shared by status-left and status-right, or used multiple times, will
  only be run once.

run-shell and if-shell still use system()/popen() but will be changed over to
use this too later.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.