dacs_de_test

NAME

dacs_de_test - Test the status of a process.

SYNOPSIS

DACS_ERR_T dacs_de_test ( 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).
Note: If the return value is DACS_STS_PROC_RUNNING then the exit_status is not modified.

DESCRIPTION

The dacs_de_test service returns the status of the target process, if it was successful, or an error code.

When this service or dacs_de_wait() 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_test service returns an error indicator defined as:
  • DACS_STS_PROC_RUNNING: the process is still running.
  • 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_wait(3)