Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

explain_waitpid_or_die(3) [debian man page]

explain_waitpid_or_die(3)				     Library Functions Manual					 explain_waitpid_or_die(3)

NAME
explain_waitpid_or_die - wait for process to change state and report errors SYNOPSIS
#include <libexplain/waitpid.h> int pid = explain_waitpid_or_die(int pid, int *status, int options); DESCRIPTION
The explain_waitpid_or_die function is used to call the waitpid(2) system call. On failure an explanation will be printed to stderr, obtained from explain_waitpid(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_waitpid_or_die(pid, status, options); pid The pid, exactly as to be passed to the waitpid(2) system call. status The status, exactly as to be passed to the waitpid(2) system call. options The options, exactly as to be passed to the waitpid(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
waitpid(2) wait for process to change state explain_waitpid(3) explain waitpid(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_waitpid_or_die(3)

Check Out this Related Man Page

explain_wait_or_die(3)					     Library Functions Manual					    explain_wait_or_die(3)

NAME
explain_wait_or_die - wait for process to change state and report errors SYNOPSIS
#include <libexplain/wait.h> void explain_wait_or_die(int *status); DESCRIPTION
The explain_wait_or_die function is used to call the wait(2) system call. On failure an explanation will be printed to stderr, obtained from explain_wait(3), and then the process terminates by calling exit(EXIT_FAILURE). This function is intended to be used in a fashion similar to the following example: explain_wait_or_die(status); status The status, exactly as to be passed to the wait(2) system call. Returns: This function only returns on success. On failure, prints an explanation and exits. SEE ALSO
wait(2) wait for process to change state explain_wait(3) explain wait(2) errors exit(2) terminate the calling process COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_wait_or_die(3)
Man Page

4 More Discussions You Might Find Interesting

1. Programming

plz help!

i'm pretty new to unix programming. i just wanna know how exactly fork(), waitpid() works. i have read some from the book, but it's still confusing. especially with those < 0 and == 0. plz help!!!! (1 Reply)
Discussion started by: ligerdave
1 Replies

2. UNIX for Advanced & Expert Users

retrieve process state programatically

Assume I spawn a process on (csh) command line, like > du -a / >& /dev/null & which creates a process with id 1234. Now, I can suspend/resume that process with > kill -STOP 1234 > kill -CONT 1234 and can query the process state via 'jobs' or 'ps. How can I though query that state... (6 Replies)
Discussion started by: Andre_Merzky
6 Replies

3. UNIX for Dummies Questions & Answers

system calls in C

Hello, how would i be able to call ps in C programming? thanks, ---------- Post updated at 01:39 AM ---------- Previous update was at 01:31 AM ---------- here's the complete system call, ps -o pid -p %d, getpit() (2 Replies)
Discussion started by: l flipboi l
2 Replies

4. Programming

[C]Fork and waitpid

Hi folks, I am writing a simple program to understand how fork() and waitpid works, but it doesn't seem that is working like I wanted. if(fork()==0){ //el hijo pid1=getpid(); printf("\nSoy el hijo %d",pid1); }else { //el padre if (fork()==0) { //el hijo pid2=getpid();... (2 Replies)
Discussion started by: lamachejo
2 Replies