summaryrefslogtreecommitdiffstats
path: root/src/quotacheck
diff options
context:
space:
mode:
Diffstat (limited to 'src/quotacheck')
-rw-r--r--src/quotacheck/quotacheck.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c
index c40c7d5d07..1bf718e4f6 100644
--- a/src/quotacheck/quotacheck.c
+++ b/src/quotacheck/quotacheck.c
@@ -71,14 +71,6 @@ static void test_files(void) {
}
int main(int argc, char *argv[]) {
-
- static const char * const cmdline[] = {
- QUOTACHECK,
- "-anug",
- NULL
- };
-
- pid_t pid;
int r;
if (argc > 1) {
@@ -106,10 +98,15 @@ int main(int argc, char *argv[]) {
return EXIT_SUCCESS;
}
- r = safe_fork("(quotacheck)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid);
+ r = safe_fork("(quotacheck)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG|FORK_WAIT, NULL);
if (r < 0)
goto finish;
if (r == 0) {
+ static const char * const cmdline[] = {
+ QUOTACHECK,
+ "-anug",
+ NULL
+ };
/* Child */
@@ -117,8 +114,6 @@ int main(int argc, char *argv[]) {
_exit(EXIT_FAILURE); /* Operational error */
}
- r = wait_for_terminate_and_check("quotacheck", pid, WAIT_LOG);
-
finish:
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}