Changeset - d18bf2f45283
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 15 years ago 2010-09-03 00:08:20
ohnobinki@ohnopublishing.net
execio: Remove some debug messages.
1 file changed with 0 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/common/execio.c
Show inline comments
 
@@ -130,15 +130,12 @@ int execio_open(struct execio **rem, con
 
	{
 
	  if(!close(counter))
 
	    counter2 ++; /* record how many descriptors we still had open :-) */
 
	  counter --;
 
	}
 
      
 
      /* stderr is the only stream we haven't confiscated atm - just for fun - I will confiscate it later, though, to support parsing error messages */
 
      fprintf(stderr, "closed %d/%d fds before execing \"%s\"\n", counter2, maxfds, progname);
 

	
 
      /*
 
	now exec: execvp uses interpreter to find the file to exec
 
       */
 
      execvp(progname, argv);
 

	
 
      fprintf(stderr, "uh-oh, ``%s'' didn't start for execio\n", progname);
 
@@ -250,13 +247,12 @@ int execio_close(struct execio *eio)
 
  /* maybe we should just kill rather than term the child */
 
  kill(eio->child, SIGTERM);
 
  /* 
 
     the waitpid(2) seems to indicate that only when the child is terminated will this wait return. 
 
     This are of code will probably need improving - the ability to seng SIGKILL after a timeout? So we'll output a debug line before running waitpid
 
  */
 
  fprintf(stderr, "execio_close: running waitpid\n");
 
  waitpid(eio->child, &childstatus, 0);
 

	
 
  free(eio);
 
  
 
  return 0;
 
}
0 comments (0 inline, 0 general)