diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-01-21 03:01:13 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-01-21 04:03:54 +0100 |
commit | 3576d6315f3b6b686cdcf9f280d5e829e3d3daa0 (patch) | |
tree | b89135ea6144eb7bc53c165d2c6eeac18ed2e259 /src/shared/util.c | |
parent | 72521ab9fd8a47e5b9df4b99b7289531124df5e7 (diff) |
import: add image verification using gpg
This also adds an initial keyring for the verification, that contains
Ubuntu's and Fedora's key. We should probably add more entries sooner or
later.
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 5157b94a34..9392477787 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -8011,3 +8011,13 @@ ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length) { return q - (const uint8_t*) p; } + +void sigkill_wait(pid_t *pid) { + if (!pid) + return; + if (*pid <= 1) + return; + + if (kill(*pid, SIGKILL) > 0) + (void) wait_for_terminate(*pid, NULL); +} |