summaryrefslogtreecommitdiff
path: root/src/kmod-setup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-09-15 14:37:16 +0200
committerLennart Poettering <lennart@poettering.net>2010-09-15 14:37:45 +0200
commit2e78aa9988425d540a572535fa2e3d68ff519316 (patch)
tree33d1d0a9bd0bd7adc59336137c544a86e3070b9c /src/kmod-setup.c
parentb036fc0050b21fb0d284a11019ea0a77be264296 (diff)
util: introduce waitpid_loop()
Diffstat (limited to 'src/kmod-setup.c')
-rw-r--r--src/kmod-setup.c13
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) {