Commit Graph
40 Commits
Author SHA1 Message Date
tmux update bot efaa1fe31c Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  If writing a file fails, propagate the error to the server via a new message. Use a client flag rather than bumping the protocol version. GitHub issue 5451.
  Add default terminal features for Rio, GitHub issue 5489 from Raphael Amorim.
2026-08-17 09:45:11 +00:00
nicm 1729bb8e8a If writing a file fails, propagate the error to the server via a new
message. Use a client flag rather than bumping the protocol version.
GitHub issue 5451.
2026-08-17 09:45:10 +00:00
tmux update bot 008a3f3f8b Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  Do not try to write to clients which have died, GitHub issue 5431 from Stefan Ladstätter.
2026-07-26 16:16:39 +00:00
nicm 4cc45aa719 Do not try to write to clients which have died, GitHub issue 5431 from
Stefan Ladstätter.
2026-07-26 16:16:37 +00:00
Thomas Adam 25e2e1d671 Merge remote-tracking branch 'refs/remotes/tmux-openbsd/master'
* refs/remotes/tmux-openbsd/master:
  build: don't exit
  build: always attempt portable merge
  build: capture openbsd-base before filtering
  build: fetch cutover master before merge
  Use _exit in child after fork, from Yayo Razo in GitHub issue 5376.
  Add missing calloc check and use fatal. Prompted by a similar change from Yayo Razo.
  actions: use published openbsd-git as base update
  github actions: automate updates
  Do not make pty fds blocking again until all the data has been consumed or control mode clients can get stuck, GitHub issue 5356 from Ben Maurer.
  Add formats and events for OSC 133 commmands, as well as a -T flag to set-hook -B to only fire when the format is true.
  Replace the notification system with events. Events can carry a payload of additional payload (to reduce problems with lifetime of objects) and are delivered to one or more event sinks. This is more powerful and reduces the complex dependencies between control mode and hooks. Events are now used for hooks, control mode notifications and for monitors (set-hook -B).
2026-07-13 09:22:25 +01:00
nicm d29aa12117 Replace the notification system with events. Events can carry a payload of
additional payload (to reduce problems with lifetime of objects) and are
delivered to one or more event sinks. This is more powerful and reduces the
complex dependencies between control mode and hooks. Events are now used for
hooks, control mode notifications and for monitors (set-hook -B).

wait-for can now wait for an event to fire (-E flag, with -F to for filter),
with -v to print the payload, as well as listing (-l) waiting clients on an
event and forcing one to wake (-w).

A few additional hooks are also now available (pane-created, pane-resized, etc)
and some of the existing ones have additional format variables available.
2026-07-10 13:38:45 +00:00
Thomas Adam a9ba7b8ecb Merge branch 'obsd-master' 2026-05-18 09:38:02 +01:00
nicm 742efe989f Report file open errors more sensibly, reported by Meriel Luna
Mittelbach in GitHub issue 5081.
2026-05-17 10:54:01 +00:00
Thomas Adam e4a439aa0c Merge branch 'obsd-master' 2026-04-26 21:12:23 +01:00
nicm 1d9522a7a6 Kill client rather than fatalx on bad file handling messages, reported
by Tim Zheng.
2026-04-23 12:36:15 +00:00
Thomas Adam 4cb29deb93 Merge branch 'obsd-master' 2026-02-27 12:01:08 +00:00
nicm 50e51b4513 Fix memory leak, from Chris Lewis, reported by Huihui Huang. 2026-02-27 08:23:02 +00:00
Thomas Adam 44c0443983 Merge branch 'obsd-master' 2025-11-03 09:57:35 +00:00
nicm 8cb2805eb7 Handle ~ correctly when loading a file, GitHub issue 3518. 2025-11-01 16:42:59 +00:00
Thomas Adam f4c0fe2ede Merge branch 'obsd-master' 2025-08-22 08:37:26 +01:00
nicm 4ce893ebc0 Do not leak opened file, from lg65438805 at gmail dot com in GitHub
issue 4577.
2025-08-14 06:37:29 +00:00
Thomas Adam 9d8131c190 Merge branch 'obsd-master' 2023-04-27 19:16:08 +01:00
nicm bcafe51378 Make the check if printing is allowed the same as writing which is less
confusing.
2023-04-17 17:58:35 +00:00
Thomas Adam 21e00e4635 Merge branch 'obsd-master' 2023-01-06 09:02:00 +00:00
nicm 09afc6c8ee If a pane is killed, cancel reading from the file. GitHub issue 3422. 2023-01-06 07:09:27 +00:00
Thomas Adam f7b30ed3d4 Merge branch 'obsd-master' 2022-08-24 10:01:13 +01:00
nicm e867528209 Check for NULL returns from bufferevent_new. 2022-08-24 07:22:30 +00:00
Thomas Adam 03054598df Merge branch 'obsd-master' into master 2021-08-22 16:01:19 +01:00
nicm 72d905f32c Do not double free expanded path in source-file, also remove some
unnecessary assignments.
2021-08-22 13:48:29 +00:00
nicm cfc7c9cf24 Fire check callback after cleaning up event so it does not get stuck,
from Jeongho Jang in GitHub issue 2695.
2021-06-10 07:51:43 +00:00
Nicholas Marriott 8da4573088 Fire check callback after cleaning up event so it does not get stuck, from
Jeongho Jang in GitHub issue 2695.
2021-05-03 10:49:51 +01:00
Thomas Adam ce5de76592 Merge branch 'obsd-master' into master 2021-02-17 09:58:12 +00:00
nicm 632636dba5 Do not care about the server socket closing if exiting anyway. 2021-02-12 06:52:48 +00:00
nicm 2b58c226db Add a couple of helper functions, and flush imsgs on exit. 2021-02-11 09:39:29 +00:00
nicm e40831a002 Move file handling protocol stuff all into file.c so it can be reused
more easily.
2021-02-11 08:28:45 +00:00
Thomas Adam a4cb700269 Merge branch 'obsd-master' 2020-05-26 14:02:15 +01:00
nicm ea610a3119 Pass the stdout file descriptor from the client as well as stdin and use
them for control clients directly instead of passing everything via the
client.
2020-05-26 08:41:47 +00:00
nicm aa7dccf8e1 imsg.h needs uio.h, pointed out by deraadt 2020-05-08 14:15:11 +00:00
Nicholas Marriott 846b99e0cb Portable does not need sys/queue.h. 2020-05-03 10:49:16 +01:00
Nicholas Marriott 479d411dda Remove imsg.h. 2019-12-16 20:01:26 +00:00
nicm 1bdd4828bd If /dev/fd/X is a symlink and realpath() expands symlinks, /dev/fd/X
ends up pointing to the wrong place before it is passed to the client.
The path is only used internally so there is no real need for
realpath(), remove it and move the get_path function to file.c where all
the callers are.
2019-12-16 16:39:03 +00:00
nicm b4520aaf2c Need to include message size in the maximum buffer calculation. 2019-12-16 16:09:28 +00:00
nicm eaa58d28dc Instead of using large buffers in imsgs, add the data or path onto the end. 2019-12-16 15:48:50 +00:00
nicm 268f2b047a Do not check if client is dead if it is NULL. 2019-12-12 11:51:32 +00:00
nicm c284ebe0ad Rewrite the code for reading and writing files. Now, if the client is
not attached, the server process asks it to open the file, similar to
how works for stdin, stdout, stderr. This makes special files like
/dev/fd/X work (used by some shells). stdin, stdout and stderr and
control mode are now just special cases of the same mechanism. This will
also make it easier to use for other commands that read files such as
source-file.
2019-12-12 11:39:56 +00:00