Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal capture.c capture.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 8 Jan 2002 03:32:15 -0600 (CST)
guy         2002/01/08 03:32:15 CST

  Modified files:
    .                    capture.c capture.h 
  Log:
  Add a routine to kill a capture child if it exists, so that if we exit
  (by deleting the main window or selecting File->Quit or typing ^Q) while
  an "Update list of packets in real time" capture is in progress, we can
  abort the capture.
  
  Arrange that "fork_child" is -1 when there is no capture child, so said
  routine knows when it can kill the child.
  
  When we exit, kill off any capture child, using that routine, and, if
  we're exiting due to a request to delete the main window and, if a read
  is in progress (from an "Update list of packets in real time" capture),
  don't delete the main window - just set the "Read aborted" flag, so that
  the code doing the read will see that flag (it will be called because
  the pipe to the capture child is closed due to the child exiting) will
  see that and clean up and exit itself.
  
  Revision  Changes    Path
  1.166     +17 -2     ethereal/capture.c
  1.27      +4 -1      ethereal/capture.h