ls_rwaittid
Provides support for collecting the status of a specified remote task.ls_rwaittid is modelled after the UNIX waitpid() system call. It provides support for collecting the status of the remote task whose task ID is tid.
If a remote child's status is successfully obtained, then the remote task ID (which is returned by an earlier ls_rtask or ls_rtaske call) is returned. Also, if status is not NULL, the status of the exited child is stored in the structure pointed to by status. If ru is not NULL, and the remote child's machine supports the rusage structure in its wait3() call, the resource usage information of the exited child is stored in the structure pointed to by ru. Only the ru_utime and ru_stime fields are set in the structure if the remote child's machine does not support the rusage structure in the wait3() call. If the remote child is run on a different platform than the parent, then only the fields in the resource structure that are common between the two platforms are filled in (the rusage structure is not identical across all platforms). If the child runs on a 64-bit machine, and the parent runs on a 32-bit machine, each of the values in the rusage structure that will overflow on a 32-bit machine are set to LONG_MAX.
ls_rwaittid behaves identically to ls_rwait if tid has a value of zero. If tid is less than 0, it returns -1 and sets lserrno to LSE_BAD_ARGS
Use the blocking mode of ls_rwaittid with care. If there are both local and remote children, ls_rwaittid take care only of remote children; none of them will return even though a local child has exited. In such cases, you can call wait(), ls_rwait and/or ls_rwaittid via signal handlers (for SIGCHLD and SIGUSR1, respectively) to process local and remote children.
Any program using these routines must call ls_initrex first.
Any program using these routines must be setuid to root if LSF_AUTH is not defined in the lsf.conf file.
The remote file operations make use of a Remote File Server on the remote host. When this RFS shuts down, its status will be reported to its client. The client should ignore this status.
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <lsf/lsf.h>int ls_rwaittid(int tid, LS_WAIT_T *status, int options, struct rusage *ru)
Data Structures:
- Parameters:
tid The ID of the remote task being accessed. *status return_values_waittid options If options is set to 0, and there is at least one remote task, the calling host is blocked until the specific task exits. If options is WNOHANG(non-blocking), it reads the child's status if the child is dead, otherwise it returns immediately with 0. If the status of the child is successfully read, the remote task ID is returned. *ru The structure where the resource usage information of the exited child is stored. Define Statements:
- none
Errors:
- Returns:
- char:remote task ID
The function was successful.int:-1
Function failed.Equivalent line commands:
- If the function fails, lserrno is set to indicate the error. If tid is less than 0, it returns -1 and sets lserrno to LSE_BAD_ARGS
Files:
- none
- ${LSF_ENVDIR:-/etc}/lsf.conf
Date Modified: 16 Jul 2014
Terms of Use
Copyright © 1994-2014 International Business Machines Corp.
US Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.