about summary refs log tree commit homepage
path: root/iostat_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'iostat_process.c')
-rw-r--r--iostat_process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iostat_process.c b/iostat_process.c
index 90a291f..4d7dfbf 100644
--- a/iostat_process.c
+++ b/iostat_process.c
@@ -65,7 +65,7 @@ static void dup2_or_die(int oldfd, int newfd, const char *errdesc)
 
         if (rc < 0) {
                 syslog(LOG_CRIT, "dup2(%s) failed: %m", errdesc);
-                abort();
+                _exit(1);
         }
 }
 
@@ -96,7 +96,7 @@ static pid_t iostat_fork_exec(int out_fd)
 
         cmd = exec_cmd(cmd);
 
-        iostat_pid = fork();
+        iostat_pid = mog_fork_for_exec();
         if (iostat_pid < 0) {
                 syslog(LOG_ERR, "fork() for iostat failed: %m");
         } else if (iostat_pid > 0) {
@@ -111,7 +111,7 @@ static pid_t iostat_fork_exec(int out_fd)
                 mog_intr_enable();
                 execl("/bin/sh", "sh", "-c", cmd, (char *)NULL);
                 syslog(LOG_CRIT, "execl(%s) failed: %m", cmd);
-                abort();
+                _exit(1);
         }
         mog_free(cmd);
         return iostat_pid;