Table of Contents

Name

thrulay_wait - check status, wait or stop a thrulay test.

Synopsis

#include <thrulay.h>

int thrulay_wait(int tid, int * status, thrulay_wait_option_t option);

Description

thrulay_wait checks status of a test process, waits for a test process to exit or stops a test process. The intended test is specified by tid and if status is not NULL, status information is stored in the location it points to. A valid thrulay wait option must be one of the following values:

THRULAY_POLL
Check status of a test process and return immediately.

THRULAY_WAIT
Suspend the current process execution until the intended test process finishes.

THRULAY_STOP
Stop a test process if it is still running.

Return Values

THRULAY_POLL
If the test process is running but makes no progress, return 0 and put 0 to the location pointed to by status;

If the test process is running and makes progress, return 0 and put index of the lastest available report to the location pointed to by status;

If the test exits successfully, return tid and put index of the lastest available report to the location pointed to by status;

If the test exits with error, return tid and put the error code to the location pointed to by status;

If error occurs in function call, return the error code and put 0 to location pointed to by status;

THRULAY_WAIT
If the test exits successfully, return tid and put index of the lastest available report to the location pointed to by status;

If the test exits with error, return tid and put the error code to the location pointed to by status;

If error occurs in function call, return the error code and put 0 to the location pointed to by status;

THRULAY_STOP
Return tid on success. Otherwise, an error code is returned.

Bugs

Please send bug reports to <huadongliu@gmail.com>.

Author

Huadong Liu <huadongliu@gmail.com>

Homepage

http://thrulay-hd.sourceforge.net/

See Also

thrulay_close(3)


Table of Contents