aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2019-04-28 12:00:02 +0200
committerKarel Kočí <cynerd@email.cz>2019-04-28 12:00:02 +0200
commite05d7a634692fd575189995f72c70420a4b220cb (patch)
tree0e294cb1a726484c51bc1a24bfadf8470db0a630
parent68648f8fe23dd30cffec1ec05e3de42e434e1f31 (diff)
downloaduroot-e05d7a634692fd575189995f72c70420a4b220cb.tar.gz
uroot-e05d7a634692fd575189995f72c70420a4b220cb.tar.bz2
uroot-e05d7a634692fd575189995f72c70420a4b220cb.zip
child: fix what arguments we are using
-rw-r--r--child.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/child.c b/child.c
index d087064..d0e09a8 100644
--- a/child.c
+++ b/child.c
@@ -1,7 +1,7 @@
/* uroot - User's root
* child.c Source file for child with unshared resources
*
- * Copyright (C) 2018 Karel Kočí
+ * Copyright (C) 2018-2019 Karel Kočí
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -53,7 +53,7 @@ int child_main(void *_args) {
char *new_argv[args->argc + 1];
memcpy(new_argv, args->argv + 1, args->argc * sizeof *new_argv);
new_argv[args->argc] = NULL;
- execvp(args->argv[1], new_argv);
+ execvp(new_argv[0], new_argv);
assert_perror(errno);
}
return 1;