Daniel De Graaf
289eb5ccd9
Wait for the cgroup request job to complete
...
The StartTransientUnit call returns as soon as the job is enqueued, but
does not wait for systemd to actually do the work. Wait for the job
completion signal before continuing to exec, or until 1 second has
passed.
2025-03-26 19:54:46 -04:00
Daniel De Graaf
d34cf29b38
Move cgroup dbus requests to the child
...
This avoids a race where a spawned child that quickly forks will have
only the parent process moved to the newly created cgroup, leaving the
early children in tmux's own cgroup. It also avoids problems if the
spawned process inspects or changes its own cgroup.
2025-03-25 22:32:19 -04:00
Nicholas Marriott
6874ec0dcc
Remove endian.h.
2024-11-27 10:31:51 +00:00
Nicholas Marriott
252f41818e
Update imsg and remove workaround.
2024-11-27 10:30:52 +00:00
Nicholas Marriott
1365f1ce52
Add an __unused.
2024-11-22 08:07:21 +00:00
Nicholas Marriott
7fc4e54efe
And arpa/inet.h needs to stay...
2024-11-22 08:06:30 +00:00
Nicholas Marriott
c98c08c232
Need to remove endian.h as well.
2024-11-22 08:05:02 +00:00
Nicholas Marriott
990c724bd8
Bring in updated imsg.
2024-11-22 08:03:55 +00:00
Nicholas Marriott
b6d0b4be30
Define SD_ID128_UUID_FORMAT_STR if missing, from Marc Reisner.
2024-11-19 17:55:12 +00:00
Nicholas Marriott
775789fbd5
Rename header guards on compat/queue.h to avoid it conflicting if the system
...
header is included first. This matters on some platforms (macOS) where queue.h
is old. From Saagar Jha in GitHub issue 4041.
2024-08-04 09:57:26 +01:00
Nicholas Marriott
3823fa2c57
Send SIGHUP since some programs ignore SIGTERM, from Eduardo Grajeda in GitHub
...
issue 3958.
2024-04-30 12:38:58 +01:00
Nicholas Marriott
dd4c0109a9
Missing headers for Android, from Biswapriyo Nath.
2024-04-15 09:07:41 +01:00
Nicholas Marriott
f3f1c3db58
Add missing headers, from Marvin Schmidt.
2024-03-06 21:29:28 +00:00
Nicholas Marriott
55d0abad89
Need htonll and ntohll.
2024-01-17 10:57:32 +00:00
Nicholas Marriott
7d91b4b90b
htobe is not portable.
2024-01-17 09:47:35 +00:00
Nicholas Marriott
66369416fc
Update imsg.
2024-01-17 09:41:53 +00:00
Nicholas Marriott
b9524f5b72
Add support for spawning panes in separate cgroups with systemd and a configure
...
flag to disable. From Eric T Johnson yut23 AT gvljohnsons DOT com in GitHub
issue 3514.
2023-04-03 08:54:06 +01:00
Nicholas Marriott
5ce34add77
Do not attempt to connect to the socket as a client if systemd is active, from
...
Julien Moutinho in GitHub issue 3345.
2022-10-18 15:58:06 +01:00
Nicholas Marriott
19344ec890
Add headers and fix type, from Marvin Schmidt. GitHub issue 3332.
2022-09-19 07:03:17 +01:00
Nicholas Marriott
19344efa78
Fix fallback implementaion of getpeereid, from Pino Toscano.
2022-08-22 08:21:42 +01:00
Nicholas Marriott
be2617036f
Remove extra definition of getpeereid. From Eric N Vander Weele in GitHub issue
...
3209.
2022-06-02 21:45:53 +01:00
Nicholas Marriott
8bcd392ee7
On platforms with no way to get peer UID, use getuid(), also fix some failure
...
checks.
2022-04-06 16:47:59 +01:00
Nicholas Marriott
fc7f1e7acb
Add support for systemd socket activation (where systemd creates the Unix
...
domain socket for tmux rather than tmux creating it). Build with
--enable-systemd. From Julien Moutinho in GitHub issue 3119.
2022-03-28 08:42:13 +01:00
Nicholas Marriott
04952f15df
Use getpeerucred if available (not tested).
2022-03-08 11:35:06 +00:00
Nicholas Marriott
afd9b68d10
Add getpeerid compat.
2022-03-08 11:02:17 +00:00
Nicholas Marriott
0792b65863
Remove compat.h again.
2021-03-08 08:59:13 +00:00
Nicholas Marriott
c01251d023
Merge branch 'master' into 3.2-rc
2021-03-02 12:08:34 +00:00
Nicholas Marriott
e3d71d9bdf
Add compat clock_gettime for older macOS. GitHub issue 2555.
2021-02-05 11:01:21 +00:00
Nicholas Marriott
681c0d2bfb
Include compat.h after system headers, GitHub issue 2492.
2020-12-07 12:13:20 +00:00
Nicholas Marriott
2f1578ef83
Update closefrom from OpenSSH for macOS code which is now needed.
2020-11-20 09:05:32 +00:00
Nicholas Marriott
bfdc4373d7
Update closefrom from OpenSSH for macOS code which is now needed.
2020-11-17 17:57:21 +00:00
Nicholas Marriott
72c46aa15e
Add support for Haiku, from David Carlier. GitHub issue 2453.
2020-11-09 09:00:41 +00:00
Nicholas Marriott
991d5a9c74
Add compat for getdtablesize, GitHub issue 2406.
2020-10-07 09:39:43 +01:00
Nicholas Marriott
3a1fc7315c
Add getline compat.
2020-06-18 21:01:55 +01:00
Nicholas Marriott
5423bf6db8
Missing headers from compat/asprintf.c, from cyyever at outlook dot com.
2019-09-08 21:29:22 +01:00
Nicholas Marriott
9f0904ce6f
Remove unused fparseln compat code.
2019-05-27 14:28:05 +01:00
Nicholas Marriott
aebb17dc75
Sync imsg from OpenBSD.
2018-04-23 15:40:15 +01:00
Nicholas Marriott
6ce8fe0537
Still need to globfree on failure.
2017-12-27 13:54:37 +00:00
Nicholas Marriott
143ccd27b4
Add memmem to compat.
2017-06-09 08:53:58 +01:00
Nicholas Marriott
78352fdd32
Add a small dance to daemon() to reattach tmux to the user's namespace (which
...
allows access to the clipboard) on OS X 10.10 and above.
Chis Johnsen has done much work on and documentation of this issue, the code is
copied (with some tweaks) from his reattach-to-user-namespace at:
https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
Tested by Enrico Ghirardi.
Will see how this goes, if it breaks stuff it might go away again.
2017-06-06 07:59:53 +01:00
Nicholas Marriott
9420758127
getptmfd() and fdforkpty() compat.
2017-04-20 19:09:07 +01:00
Nicholas Marriott
9583878a7b
Accept NULL pointer.
2017-04-12 07:41:11 +01:00
Nicholas Marriott
d720a1487b
Update imsg*.c from OpenBSD.
2017-04-11 11:51:25 +01:00
Nicholas Marriott
2e5664d2df
Update imsg*.[ch] from OpenBSD, add some compat bits it needs and remove some
...
bits it doesn't.
2017-03-24 10:05:53 +00:00
Nicholas Marriott
cd7550cdf1
Some __unused.
2017-03-21 19:27:18 +00:00
Nicholas Marriott
640666fb36
Fix some warnings.
2017-03-17 14:55:33 +00:00
Nicholas Marriott
fd96ccfd80
No extra : for errx and warnx.
2017-03-09 16:49:37 +00:00
Nicholas Marriott
b79df1dc29
Compat code for strndup and strnlen.
2017-03-09 15:43:08 +00:00
Nicholas Marriott
514a723f74
Solaris fixes, mostly from Dagobert Michelsen.
2017-03-09 15:39:13 +00:00
Nicholas Marriott
4eabd7ec90
Do not declare program_invocation_short_name because people can't make up their
...
mind what type it should be.
2017-02-06 13:34:19 +00:00