• Adam Wujek's avatar
    userspace/tools: fix checking of child's return status in load-virtex · dfc16041
    Adam Wujek authored
    While checking return status first WIFEXITED has to be checked to know if child
    returned normally.
    waitpid's man page:
    WEXITSTATUS(status) returns the exit status of the child. (...) This macro
    should be employed only if WIFEXITED returned true.
    WIFEXITED(status) returns true if the child terminated normally, that is, by
    calling exit(3) or _exit(2), or by returning from main().
    Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
    dfc16041