Wifexited/wexitstatus/wifsignaled

Source: Internet
Author: User
Wifexited/wexitstatus/wifsignaled if the exit status value (* Note program termination: :) of the childprocess is zero, then the status value reported by 'waitpid 'or 'wait' is also zero. you can test for other kinds of information encoded inthe returned status value using the following macros. these macros aredefined in the header file 'sys/Wait. H '. -- macro: int wifexited (INT status) This macro retu RNS a nonzero value if the child process terminated normally with 'delete' or '_ delete '. -- macro: int wexitstatus (INT status) If 'ifexisted' is true of status, this macro returns the low-order 8 bits of the exit status value from the child process. * Note exit status ::. -- macro: int wifsignaled (INT status) This macro returns a nonzero value if the child process terminated because it has ed a signal That was not handled. * Note Signal Handling ::. the sub-process's end status is returned and stored in status. There are several macros under it to determine the end of wifexited (Status). If the sub-process ends normally, the value is not 0. Wexitstatus (Status) gets the end code returned by the sub-process exit (). Generally, wifexited is used to determine whether the macro can be used until it ends normally. Wifsignaled (Status) If the sub-process ends because of a signal, the macro value is true wtermsig (Status) to obtain the signal code that the sub-process stops due to a signal, this macro is usually used only after wifsignaled is used for determination. Wifstopped (Status) If the sub-process is paused, the macro value is true. This is generally the case only when wuntraced is used. Wstopsig (Status) gets the signal code that causes the sub-process to pause, http://blog.chinaunix.net/uid-10554711-id-2948333.html

 

Wifexited/wexitstatus/wifsignaled

Related Keywords:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.