Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug237: Don't compute incorrect argc for timedrun

Since spawn_and_wait doesn't use argc anyway, might as well just not
send a value in.
  • Loading branch information...
commit 016a87c593240b8d4430b3f139d90132439a5562 1 parent 595572c
Dustin Sallings dustin authored dormando committed
Showing with 2 additions and 4 deletions.
  1. +2 −4 timedrun.c
6 timedrun.c
View
@@ -67,13 +67,11 @@ static int wait_for_process(pid_t pid)
return rv;
}
-static int spawn_and_wait(int argc, char **argv)
+static int spawn_and_wait(char **argv)
{
int rv = EX_SOFTWARE;
pid_t pid = fork();
- assert(argc > 1);
-
switch (pid) {
case -1:
perror("fork");
@@ -100,5 +98,5 @@ int main(int argc, char **argv)
alarm(naptime);
- return spawn_and_wait(argc+2, argv+2);
+ return spawn_and_wait(argv+2);
}
Please sign in to comment.
Something went wrong with that request. Please try again.