pbs_sigjob(3B)

NAME
pbs_sigjob - send a signal to a PBS batch job

SYNOPSIS
#include <pbs_error.h>
#include <pbs_ifl.h>

int pbs_sigjob(int connect, char *job_id, char *signal, char *extend)

DESCRIPTION
Issue a batch request to send a signal to a batch job.

A Signal Job batch request is generated and sent to the server over the connection specified by connect which is the return value of pbs_connect(). If the batch job is in the running or suspended state, the batch server will send the job the signal number corresponding to the signal named in signal .

The job_id argument identifies which job is to be signaled. It is specified in the form:
    sequence_number.server

The signal argument is the name of a signal. It may be the alphabetic form with or without the SIG prefix, or it may be a numeric string for the signal number. If the name of the signal is not a recognized signal name on the execution host, no signal is sent and an error is returned.
Certain special names are recognized:
suspend can be used only on running jobs. This signal puts the job into a suspended state.
resume can be used only on suspended jobs. This signal marks the job so that the scheduler can resume the job when resources are available.
admin-suspend can be used only on running jobs. This signal puts the job into a suspended state, and puts the job's vnodes into the maintenance state.
admin-resume can be used only on admin-suspended jobs. This signal directly resumes the job. When the last admin-suspended job has been admin-resumed, the vnode leaves the maintenance state.

The parameter, extend , is reserved for implementation-defined extensions.

SEE ALSO
qsig(1B) and pbs_connect(3B)

DIAGNOSTICS
When the batch request generated by pbs_sigjob() function has been completed successfully by a batch server, the routine will return 0 (zero). Otherwise, a non zero error is returned. The error number is also set in pbs_errno.