Changeset - 34d3e7887adb
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-04-08 16:09:42
ohnobinki@ohnopublishing.net
execio: cleaned up some comments
1 file changed with 2 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/common/execio.c
Show inline comments
 
@@ -54,10 +54,6 @@ int execio_open(struct execio **rem, con
 
      return 1;
 
    }
 
  
 
  /* make our side of the pipes nonblocking? I'll consider this type of stuff later and just keep this code in a comment like I always do... */
 
  //fcntl(pipe_write[1], F_SETFD, fcntl(pipe_write[1], F_GETFD) | O_NONBLOCK);
 
  //fucntl(pipe_read[0], F_SETFD, fcntl(pipe_read[0], F_GETFD) | O_NONBLOCK);
 
  
 
  /* parent */
 
  child = fork();
 
  if(child == -1)
 
@@ -83,7 +79,7 @@ int execio_open(struct execio **rem, con
 
	  close(pipe_write[1]);
 
	  close(pipe_read[0]);
 
	  /* we should probably pass of the wait() call to a thread that just does boring things like that. Especially for when the server tries to connect to other servers... */
 
	  /* maybe we should just kill the child */
 
	  /* maybe we should just kill instead of term the child */
 
	  kill(child, SIGTERM);
 
	  /* the waitpid(2) seems to indicate that only when the child is terminated will this wait return. */
 
	  waitpid(child, &childstatus, 0); 
 
@@ -225,7 +221,7 @@ int execio_close(struct execio *eio)
 
  close(eio->pipe_read);
 
  close(eio->pipe_write);
 

	
 
  /* maybe we should just kill the child */
 
  /* 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. 
0 comments (0 inline, 0 general)