Wireshark-commits: [Wireshark-commits] master bdea0d4: Check for ECHILD, not for "not ECHILD".
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 18 Nov 2015 19:40:45 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=bdea0d450476a077f64acbfe26e62251fcbb339d
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

bdea0d4 by Guy Harris (guy@xxxxxxxxxxxx):

    Check for ECHILD, not for "not ECHILD".
    
    That makes the logic a bit clearer (and puts the "unexpected other
    error" case at the end, where it should be).
    
    Put all the errno checks inside an else clause, making it clearer that
    it runs only if waitpid() returned -1.
    
    Add comments, including comments explaining why just driving on after
    getting EINTR should be OK.
    
    Change-Id: Iaa1b151393fcec8b4f5bd560ef913a224400932b
    Reviewed-on: https://code.wireshark.org/review/11951
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  5c49fac   Error from waitpid(): Fix Code is unreachable
    adds  bdea0d4   Check for ECHILD, not for "not ECHILD".


Summary of changes:
 capchild/capture_sync.c |   42 ++++++++++++++++++++++++++++++++++--------
 1 file changed, 34 insertions(+), 8 deletions(-)