summaryrefslogtreecommitdiffstats
path: root/src/socket-activate (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: Use log_setup() everywhereDaan De Meyer2024-04-251-3/+1
| | | | | Otherwise the default log target is the console and we won't use the journal socket even if it is available.
* process-util: add new FORK_DEATHSIG_SIGKILL flag, rename FORK_DEATHSIG → ↵Lennart Poettering2023-11-021-1/+1
| | | | | | | | | | | | | | | | | | FORK_DEATHSIG_SIGTERM Sometimes it makes sense to hard kill a client if we die. Let's hence add a third FORK_DEATHSIG flag for this purpose: FORK_DEATHSIG_SIGKILL. To make things less confusing this also renames FORK_DEATHSIG to FORK_DEATHSIG_SIGTERM to make clear it sends SIGTERM. We already had FORK_DEATHSIG_SIGINT, hence this makes things nicely symmetric. A bunch of users are switched over for FORK_DEATHSIG_SIGKILL where we know it's safe to abort things abruptly. This should make some kernel cases more robust, since we cannot get confused by signal masks or such. While we are at it, also fix a bunch of bugs where we didn't take FORK_DEATHSIG_SIGINT into account in safe_fork()
* meson: move declaration of socket-activateYu Watanabe2023-07-311-0/+10
|
* tree-wide: a bunch of Coccinelle-suggested tweaksFrantisek Sumsal2023-07-141-1/+1
| | | | rc2 edition
* socket-activate: make a copy of the command name and argumentsFrantisek Sumsal2023-06-161-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | When we call safe_fork() with the first argument set (process name), we call rename_process() that zeroes out saved argv (that was saved by save_argc_argv() in the main func defined by DEFINE_MAIN_FUNC()). In this case this means that with --accept both the target executable name and its arguments will be empty strings: ``` $ systemd-socket-activate --accept --listen 1111 cat & Listening on [::]:1111 as 3. $ curl localhost:1111 Communication attempt on fd 3. Connection from 127.0.0.1:52948 to [::ffff:127.0.0.1]:1111 Spawned cat (cat) as PID 10576. Execing () Failed to execp (): No such file or directory Child 10576 died with code 1 curl: (56) Recv failure: Connection reset by peer ``` Let's make a copy of the necessary arguments beforehand and use it instead to fix this.
* activate: rename to socket-activateFrantisek Sumsal2023-06-141-0/+488
To make the naming consistent with the rest of the utils, i.e. binary name minus the systemd- prefix.