Process-in-Process
 All Functions Groups Pages
Functions
Waiting for PiP task termination

Functions

int pip_wait (int pipid, int *status)
 wait for the termination of a PiP task More...
 
int pip_trywait (int pipid, int *status)
 wait for the termination of a PiP task in a non-blocking way More...
 
int pip_wait_any (int *pipid, int *status)
 Wait for the termination of any PiP task. More...
 
int pip_trywait_any (int *pipid, int *status)
 non-blocking version of pip_wait_any More...
 

Detailed Description

Waiting for PiP task termination

Description
Functions to wait for PiP task termination. All functions listed here must only be called from PiP root.

Function Documentation

int pip_wait ( int  pipid,
int *  status 
)
Name
pip_wait
Synopsis
#include <pip/pip.h>
int pip_wait( int pipid, int *status );
Description
This function can be used regardless to the PiP execution mode. This function blocks until the specified PiP task terminates. The macros such as WIFEXITED and so on defined in Glibc can be applied to the returned status value.
Parameters
[in]pipidPiP ID to wait for.
[out]statusStatus value of the terminated PiP task
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMPiP library is not initialized yet
EPERMThis function is called other than PiP root
EDEADLKThe specified pipid is the one of PiP root
ECHILDThe target PiP task does not exist or it was already terminated and waited for
See Also
pip_exit
pip_trywait
pip_wait_any
pip_trywait_any
int pip_trywait ( int  pipid,
int *  status 
)
Name
pip_trywait
Synopsis
#include <pip/pip.h>
int pip_trywait( int pipid, int *status );
Description
This function can be used regardless to the PiP execution mode. This function behaves like the wait function of glibc and the macros such as WIFEXITED and so on can be applied to the returned status value.
Synopsis
#include <pip/pip.h>
int pip_trywait( int pipid, int *status );
Parameters
[in]pipidPiP ID to wait for.
[out]statusStatus value of the terminated PiP task
Note
This function can be used regardless to the PiP execution mode.
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMThe PiP library is not initialized yet
EPERMThis function is called other than PiP root
EDEADLKThe specified pipid is the one of PiP root
ECHILDThe target PiP task does not exist or it was already terminated and waited for
See Also
pip_exit
pip_wait
pip_wait_any
pip_trywait_any
int pip_wait_any ( int *  pipid,
int *  status 
)
Name
pip_wait_any
Synopsis
#include <pip/pip.h>
int pip_wait_any( int *pipid, int *status );
Description
This function can be used regardless to the PiP execution mode. This function blocks until any of PiP tasks terminates. The macros such as WIFEXITED and so on defined in Glibc can be applied to the returned status value.
Parameters
[out]pipidPiP ID of terminated PiP task.
[out]statusExit value of the terminated PiP task
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMThe PiP library is not initialized yet
EPERMThis function is called other than PiP root
ECHILDThe target PiP task does not exist or it was already terminated and waited for
See Also
pip_exit
pip_wait
pip_trywait
pip_trywait_any
int pip_trywait_any ( int *  pipid,
int *  status 
)
Name
pip_trywait_any
Synopsis
#include <pip/pip.h>
int pip_trywait_any( int *pipid, int *status );
Description
This function can be used regardless to the PiP execution mode. This function blocks until any of PiP tasks terminates. The macros such as WIFEXITED and so on defined in Glibc can be applied to the returned status value.
Parameters
[out]pipidPiP ID of terminated PiP task.
[out]statusExit value of the terminated PiP task
Returns
Return 0 on success. Return an error code on error.
Return values
EPERMThe PiP library is not initialized yet
EPERMThis function is called other than PiP root
ECHILDThere is no PiP task to wait for
See Also
pip_exit
pip_wait
pip_trywait
pip_wait_any