aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-02-19 21:45:01 +0000
committerRoy Marples <roy@marples.name>2008-02-19 21:45:01 +0000
commit9e39a934b822adf811cab4f63712e487f1d9779a (patch)
treec94c126a75515434a664010bc4cf3d2a4bb681b6 /src
parentd7129163ce6561f786e7722d70cb99c3f96891fa (diff)
Fix an off-by-one error.
Diffstat (limited to 'src')
-rw-r--r--src/rc/runscript.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 3d900c0c..4405edd8 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -427,9 +427,9 @@ static bool svc_exec (const char *arg1, const char *arg2)
openpty (&master_tty, &slave_tty, NULL, &tt, &ws);
}
- service_pid = vfork();
+ service_pid = fork();
if (service_pid == -1)
- eerrorx ("%s: vfork: %s", service, strerror (errno));
+ eerrorx ("%s: fork: %s", service, strerror (errno));
if (service_pid == 0) {
if (slave_tty >= 0) {
close (master_tty);
@@ -1144,7 +1144,7 @@ int runscript (int argc, char **argv)
}
/* Make our prefix string */
- prefix = xmalloc (sizeof (char) * l);
+ prefix = xmalloc (sizeof (char) * l + 1);
ll = strlen (applet);
memcpy (prefix, applet, ll);
memset (prefix + ll, ' ', l - ll);