dacs_de_wait

NAME

dacs_de_wait - Block the caller waiting for a process running on a DE to finish.

SYNOPSIS

DACS_ERR_T dacs_de_wait ( de_id_t de, dacs_process_id_t pid, int32_t *exit_status )

Call parameters  
de The target DE.
pid The target process.
Return parameter  
*exit_status A pointer to a location where the exit code is stored (if DACS_STS_PROC_FINISHED or DACS_STS_PROC_FAILED) or the signal number (if DACS_STS_PROC_ABORTED).

DESCRIPTION

The dacs_de_wait service returns the status of the target process if it was successful, or an error code if not. If the process is running at the time of the call, the call blocks until it finishes execution. If the process has finished execution at the time of the call, the call does not block.

When this service or dacs_de_test() detects a finished, failed, or aborted status, the status is reaped. Once the status of a process has been reaped, subsequent calls to query its status will fail with DACS_ERR_INVALID_PID.

RETURN VALUE

The dacs_de_wait service returns an error indicator defined as:
  • DACS_STS_PROC_FINISHED: the process finished execution without error.
  • DACS_STS_PROC_FAILED: the process exited with a failure.
  • DACS_STS_PROC_ABORTED: the process terminated abnormally. The platform-specific exception code is returned in exit_status. For Linux/UNIX this is the signal number which caused the termination.
  • DACS_ERR_INVALID_DE: the specified DE is either invalid or not reserved.
  • DACS_ERR_INVALID_PID: the specified PID does not refer to a valid process.
  • DACS_ERR_INVALID_TARGET: the operation is not allowed for the target process.
  • DACS_ERR_INVALID_ADDR: the pointer is invalid.

SEE ALSO

dacs_de_start(3), dacs_num_processes_supported(3), dacs_num_processes_running(3), dacs_de_test(3)