Wireshark-commits: [Wireshark-commits] master-2.0 1f3e0c0: Check for ECHILD, not for "not ECHILD".

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 18 Nov 2015 19:41:06 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=1f3e0c03c548ef84b4ce36e224102dae6b914ad5
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.0
Repository: wireshark

Commits:

1f3e0c0 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>
    (cherry picked from commit bdea0d450476a077f64acbfe26e62251fcbb339d)
    Reviewed-on: https://code.wireshark.org/review/11952
    

Actions performed:

    from  c3ac3d0   Error from waitpid(): Fix Code is unreachable
    adds  1f3e0c0   Check for ECHILD, not for "not ECHILD".


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