diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-09-15 14:37:16 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-09-15 14:37:45 +0200 |
commit | 2e78aa9988425d540a572535fa2e3d68ff519316 (patch) | |
tree | 33d1d0a9bd0bd7adc59336137c544a86e3070b9c /src/kmod-setup.c | |
parent | b036fc0050b21fb0d284a11019ea0a77be264296 (diff) |
util: introduce waitpid_loop()
Diffstat (limited to 'src/kmod-setup.c')
-rw-r--r-- | src/kmod-setup.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/kmod-setup.c b/src/kmod-setup.c index e614295f37..0bcad3ceb4 100644 --- a/src/kmod-setup.c +++ b/src/kmod-setup.c @@ -76,17 +76,8 @@ int kmod_setup(void) { if (r < 0) return r; - for (;;) { - if (waitpid(pid, &status, 0) < 0) { - - if (errno == EINTR) - continue; - - return -errno; - } - - break; - } + if ((r = waitpid_loop(pid, &status)) < 0) + return -errno; if (WIFEXITED(status)) { if (WEXITSTATUS(status) != 0) { |