diff options
author | Shawn Landden <slandden@gmail.com> | 2018-02-03 10:16:33 -0800 |
---|---|---|
committer | Shawn Landden <slandden@gmail.com> | 2018-02-08 10:14:48 -0800 |
commit | 392cf1d05dbfa1395f6d99102e5ea41debb58fec (patch) | |
tree | bce8bd83f2f4c137e61c02315ac62f2509579d0a /src/basic/process-util.h | |
parent | ade681a86168de685aded6fa90400c3affe6703f (diff) | |
download | systemd-392cf1d05dbfa1395f6d99102e5ea41debb58fec.tar.gz systemd-392cf1d05dbfa1395f6d99102e5ea41debb58fec.tar.bz2 systemd-392cf1d05dbfa1395f6d99102e5ea41debb58fec.zip |
sd-bus: cleanup ssh sessions (Closes: #8076)
we still invoke ssh unnecessarily when there in incompatible or erreneous input
The fallow-up to finish that would make the code a bit more verbose,
as it would require repeating this bit:
```
r = bus_connect_transport(arg_transport, arg_host, false, &bus);
if (r < 0) {
log_error_errno(r, "Failed to create bus connection: %m");
goto finish;
}
sd_bus_set_allow_interactive_authorization(bus, arg_ask_password);
```
in every verb, after parsing.
v2: add waitpid() to avoid a zombie process, switch to SIGTERM from SIGKILL
v3: refactor, wait in bus_start_address()
Diffstat (limited to 'src/basic/process-util.h')
-rw-r--r-- | src/basic/process-util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/process-util.h b/src/basic/process-util.h index 9fabe4a5be..93029e36e5 100644 --- a/src/basic/process-util.h +++ b/src/basic/process-util.h @@ -76,6 +76,7 @@ int wait_for_terminate_with_timeout(pid_t pid, usec_t timeout); void sigkill_wait(pid_t pid); void sigkill_waitp(pid_t *pid); +void sigterm_wait(pid_t pid); int kill_and_sigcont(pid_t pid, int sig); |