Remember that execve()'s argv[0] is the program name

This commit is contained in:
Laurence Withers 2008-07-26 17:28:18 +00:00
parent 4c1a3943bd
commit 67f0ab405a
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ int main(int argc, char* argv[])
/* run process */
while(1) {
run_program(argv[optind] /* path */, argv + optind + 1 /* argv[], null terminated */);
run_program(argv[optind] /* path */, argv + optind /* argv[], null terminated */);
if(restart_interval) {
LOG(LOG_NOTICE, "Sleeping for %d seconds.", restart_interval);