aboutsummaryrefslogtreecommitdiff
path: root/src/librc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-20 13:12:21 +0000
committerRoy Marples <roy@marples.name>2007-04-20 13:12:21 +0000
commitc52f2164502544c17811e47fc3236fe87aa7fc5b (patch)
tree61d8fd8bb068f00ac8cdfa2fec14f479c754c285 /src/librc.c
parenta316a1fa7222ea845c546c02cefb71632616d862 (diff)
Added the rc-abort command, #175106 thanks to Daniel Drake.
Diffstat (limited to 'src/librc.c')
-rw-r--r--src/librc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/librc.c b/src/librc.c
index 9172ee7c..2a240a83 100644
--- a/src/librc.c
+++ b/src/librc.c
@@ -469,22 +469,22 @@ static pid_t _exec_service (const char *service, const char *arg)
return (-1);
}
- if ((pid = fork ()) == 0) {
- char *myarg = rc_xstrdup (arg);
+ if ((pid = vfork ()) == 0) {
int e = 0;
- execl (file, file, myarg, (char *) NULL);
+ execl (file, file, arg, (char *) NULL);
e = errno;
- free (myarg);
unlink (fifo);
free (fifo);
- eerrorx ("unable to exec `%s': %s", file, strerror (errno));
+ eerror ("unable to exec `%s': %s", file, strerror (errno));
+ free (file);
+ _exit (EXIT_FAILURE);
}
free (fifo);
free (file);
if (pid == -1) {
- eerror ("unable to fork: %s", strerror (errno));
+ eerror ("vfork: %s", strerror (errno));
return (pid);
}