Skip to content

Commit

Permalink
node/inetd: fix args for execvp()
Browse files Browse the repository at this point in the history
The first element of the args array of execvp() should be the called program
name, not its 1rst arg.
  • Loading branch information
steveschnepp committed Apr 11, 2013
1 parent 2501fed commit 7aa72e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/inetd.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) {
dup2(sock_accept, 0);
dup2(sock_accept, 1);
close(sock_accept);
execvp(argv[2], argv + 3);
execvp(argv[2], argv + 2);
/* according to vfork(2) we must use _exit */
_exit(1);
} else {
Expand Down

0 comments on commit 7aa72e3

Please sign in to comment.