diff options
author | Karel Kočí <cynerd@email.cz> | 2019-04-28 12:00:02 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2019-04-28 12:00:02 +0200 |
commit | e05d7a634692fd575189995f72c70420a4b220cb (patch) | |
tree | 0e294cb1a726484c51bc1a24bfadf8470db0a630 | |
parent | 68648f8fe23dd30cffec1ec05e3de42e434e1f31 (diff) | |
download | uroot-e05d7a634692fd575189995f72c70420a4b220cb.tar.gz uroot-e05d7a634692fd575189995f72c70420a4b220cb.tar.bz2 uroot-e05d7a634692fd575189995f72c70420a4b220cb.zip |
child: fix what arguments we are using
-rw-r--r-- | child.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |