---
name: "globus_gram_client_job_callback_unregister"
section: "3"
platform: "linux"
package: "libglobus-gram-client-doc"
version: "14.6-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/globus_gram_client_job_functions"
---

# globus\_gram\_client\_job\_callback\_unregister(3)

GRAM Job Functions - GRAM Job Functions.

Part of [globus\_gram\_client\_job\_functions(3)](/globus_gram_client_job_functions/3.md).

## NAME

globus\_gram\_client\_job\_functions - GRAM Job Functions

 \- GRAM Job Functions.

## SYNOPSIS

### Functions

int **globus\_gram\_client\_register\_ping** (const char \*resource\_manager\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_nonblocking\_func\_t** register\_callback, void \*register\_callback\_arg)\
 Send a ping request to a GRAM service.  int **globus\_gram\_client\_ping** (const char \*resource\_manager\_contact)\
 Send a ping request to a GRAM service.  int **globus\_gram\_client\_get\_jobmanager\_version** (const char \*resource\_manager\_contact, globus\_hashtable\_t \*extensions)\
 Get version information from a job manager.  int **globus\_gram\_client\_register\_get\_jobmanager\_version** (const char \*resource\_manager\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_info\_callback\_func\_t** info\_callback, void \*callback\_arg)\
 Get version information from a job manager without blocking.  int **globus\_gram\_client\_register\_job\_request** (const char \*resource\_manager\_contact, const char \*description, int job\_state\_mask, const char \*callback\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_nonblocking\_func\_t** register\_callback, void \*register\_callback\_arg)\
 Send a job request to a GRAM service.  int **globus\_gram\_client\_job\_request** (const char \*resource\_manager\_contact, const char \*description, int job\_state\_mask, const char \*callback\_contact, char \*\*job\_contact)\
 Send a job request to a GRAM service.  int **globus\_gram\_client\_register\_job\_request\_with\_info** (const char \*resource\_manager\_contact, const char \*description, int job\_state\_mask, const char \*callback\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_info\_callback\_func\_t** callback, void \*callback\_arg)\
 Send a job request to a GRAM service with extensions-aware callback.  int **globus\_gram\_client\_job\_request\_with\_info** (const char \*resource\_manager\_contact, const char \*description, int job\_state\_mask, const char \*callback\_contact, char \*\*job\_contact, **globus\_gram\_client\_job\_info\_t** \*info)\
 Send a job request to a GRAM service and parse extensions in the response.  int **globus\_gram\_client\_job\_cancel** (const char \*job\_contact)\
 Cancel a GRAM job.  int **globus\_gram\_client\_register\_job\_cancel** (const char \*job\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_nonblocking\_func\_t** register\_callback, void \*register\_callback\_arg)\
 Cancel a GRAM job.  int **globus\_gram\_client\_job\_signal** (const char \*job\_contact, globus\_gram\_protocol\_job\_signal\_t signal, const char \*signal\_arg, int \*job\_status, int \*failure\_code)\
 Send a signal a GRAM job.  int **globus\_gram\_client\_register\_job\_signal** (const char \*job\_contact, globus\_gram\_protocol\_job\_signal\_t signal, const char \*signal\_arg, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_nonblocking\_func\_t** register\_callback, void \*register\_callback\_arg)\
 Send a signal a GRAM job.  int **globus\_gram\_client\_job\_status** (const char \*job\_contact, int \*job\_status, int \*failure\_code)\
 Send a status query to a GRAM job.  int **globus\_gram\_client\_register\_job\_status** (const char \*job\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_nonblocking\_func\_t** register\_callback, void \*register\_callback\_arg)\
 Send a status query to a GRAM job.  int **globus\_gram\_client\_register\_job\_status\_with\_info** (const char \*job\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_info\_callback\_func\_t** info\_callback, void \*callback\_arg)\
 Send a status query to a GRAM job.  int **globus\_gram\_client\_job\_status\_with\_info** (const char \*job\_contact, **globus\_gram\_client\_job\_info\_t** \*info)\
 Send a status query to a GRAM job.  int **globus\_gram\_client\_job\_callback\_register** (const char \*job\_contact, int job\_state\_mask, const char \*callback\_contact, int \*job\_status, int \*failure\_code)\
 Register a new callback contact to be notified for job state changes.  int **globus\_gram\_client\_job\_callback\_unregister** (const char \*job\_contact, const char \*callback\_contact, int \*job\_status, int \*failure\_code)\
 Unregister a callback contact to stop job state change notifications.  int **globus\_gram\_client\_job\_refresh\_credentials** (char \*job\_contact, gss\_cred\_id\_t creds)\
 Delegate a new credential to a job.  int **globus\_gram\_client\_register\_job\_refresh\_credentials** (char \*job\_contact, gss\_cred\_id\_t creds, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_nonblocking\_func\_t** register\_callback, void \*register\_callback\_arg)\
 Delegate a new credential to a job.  int **globus\_gram\_client\_register\_job\_callback\_registration** (const char \*job\_contact, int job\_state\_mask, const char \*callback\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_nonblocking\_func\_t** register\_callback, void \*register\_callback\_arg)\
 Register a new callback contact to be notified for job state changes.  int **globus\_gram\_client\_register\_job\_callback\_unregistration** (const char \*job\_contact, const char \*callback\_contact, **globus\_gram\_client\_attr\_t** attr, **globus\_gram\_client\_nonblocking\_func\_t** register\_callback, void \*register\_callback\_arg)\
 Unregister a callback contact to stop job state change notifications.

## Detailed Description

GRAM Job Functions.

## Function Documentation

### int globus\_gram\_client\_get\_jobmanager\_version (const char \* resource\_manager\_contact, globus\_hashtable\_t \* extensions)

Get version information from a job manager. The **globus\_gram\_client\_get\_jobmanager\_version()** function sends a message to a GRAM service which returns information about the job manager version in the value pointed to by the *extensions* parameter. Note that job managers prior to GT5 do not support the version request and so will return a GLOBUS\_GRAM\_PROTOCOL\_ERROR\_HTTP\_UNPACK\_FAILED error. This function blocks while processing this request.

**Parameters**

*resource\_manager\_contact* A NULL-terminated character string containing a **GRAM contact**. \
 *extensions* A pointer to a hash table which will be initialized to contain the version information returned by the service. The extensions defined by GRAM5 are *toolkit-version* and *version*.

**Returns**

Upon success, **globus\_gram\_client\_get\_jobmanager\_version()** function returns GLOBUS\_SUCCESS and modifies the *extensions* parameter as described above. If an error occurs, the integer error code will be returned and the value pointed to by the *extensions* parameter is undefined.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_BAD\_GATEKEEPER\_CONTACT* Bad gatekeeper contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NULL\_PARAMETER* NULL parameter \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol failed \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_job\_callback\_register (const char \* job\_contact, int job\_state\_mask, const char \* callback\_contact, int \* job\_status, int \* failure\_code)

Register a new callback contact to be notified for job state changes. The **globus\_gram\_client\_job\_callback\_register()** function contacts a GRAM service managing a job and instructs it to send subsequent job state callbacks to the client listening for callbacks at the contact url named by the *callback\_contact* parameter. This function blocks until the registration operation either completes or exits.

**Parameters**

*job\_contact* The job contact string of the job to contact. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *job\_state\_mask* A bitwise-or of the GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_\* states that the job manager will send job state notification messages for to the contact named by *callback\_contact*. \
 *callback\_contact* A URL string containing a GRAM client callback. This string is normally be generated by a process calling **globus\_gram\_client\_callback\_allow()**. \
 *job\_status* An output parameter pointing to an integer to set to the status of the job after the registration message has been processed. \
 *failure\_code* An output parameter that points to an integer to be set to the reason why the job failed if its current status is *GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_FAILED*. If the job has not failed, the value will be set to 0.

**Returns**

Upon success, the **globus\_gram\_client\_job\_callback\_register()** function returns *GLOBUS\_SUCCESS*, sends a registration request the job named by *job\_contact* and parses the service response, modifying the values pointed to by the *job\_status* and *failure\_code* parameters as described above. If an error occurs, **globus\_gram\_client\_job\_callback\_register()** returns an integer error code indicating why it can't register the callback contact. The return code may be any value defined by the *globus\_gram\_protocol\_error\_t* enumeration in addition to those listed below.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_job\_callback\_unregister (const char \* job\_contact, const char \* callback\_contact, int \* job\_status, int \* failure\_code)

Unregister a callback contact to stop job state change notifications. The **globus\_gram\_client\_job\_callback\_unregister()** function contacts a GRAM service managing a job and instructs it to stop sending job state callbacks to the client listening for callbacks at the contact url named by the *callback\_contact* parameter. This function blocks until the unregistration operation either completes or exits. It is possible that callbacks related to the job arrive at the contact after this function returns depending on network delays.

**Parameters**

*job\_contact* The job contact string of the job to contact. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *callback\_contact* A URL string containing a GRAM client callback. This string is normally be generated by a process calling **globus\_gram\_client\_callback\_allow()**. \
 *job\_status* An output parameter pointing to an integer to set to the status of the job after the registration message has been processed. \
 *failure\_code* An output parameter that points to an integer to be set to the reason why the job failed if its current status is *GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_FAILED*. If the job has not failed, the value will be set to 0.

**Returns**

Upon success, the **globus\_gram\_client\_job\_callback\_unregister()** function returns *GLOBUS\_SUCCESS*, sends an unregister request the job named by *job\_contact* and parses the service response, modifying the values pointed to by the *job\_status* and *failure\_code* parameters as described above. If an error occurs, **globus\_gram\_client\_job\_callback\_unregister()** returns an integer error code indicating why it can't unregister the callback contact. The return code may be any value defined by the *globus\_gram\_protocol\_error\_t* enumeration in addition to those listed below.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_job\_cancel (const char \* job\_contact)

Cancel a GRAM job. The **globus\_gram\_client\_job\_cancel()** function cancels a GRAM job. Depending on the job's current state, this cancellation may be immediate or require a delay for interacting with the LRM servicing the job. Notification when the job has been successfully canceled will be sent to all client contacts registered for notifications after the cancellation has been completely processed. Unlike, **globus\_gram\_client\_register\_job\_cancel()**, **globus\_gram\_client\_job\_cancel()** blocks until the job cancel request has been processed by the service.

**Parameters**

*job\_contact* A NULL-terminated character string containing a GRAM job contact that this function will contact to cancel the job.

**Returns**

Upon succes, **globus\_gram\_client\_job\_cancel()** returns *GLOBUS\_SUCCESS* if the cancellation was successful posted to the service. If an error occurs, **globus\_gram\_client\_job\_cancel()** returns one of the #globus\_gram\_protocol\_error\_t values values indicating why the client could not cancel the job.

**See also**

**globus\_gram\_client\_register\_job\_cancel()**

### int globus\_gram\_client\_job\_refresh\_credentials (char \* job\_contact, gss\_cred\_id\_t creds)

Delegate a new credential to a job. The **globus\_gram\_client\_job\_refresh\_credentials()** function sends a 'renew' signal to a GRAM service and then initiates the delegation of a new credential to the job manager and job. This prevents errors that can occur when a credential expires. This function blocks until the delegation has completed or failed.

**Parameters**

*job\_contact* The job contact string of the job to contact. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *creds* A GSSAPI credential handle which will be used to authenticate with the job manager and sign the delegated credential. This parameter's value may be set to *GSS\_C\_NO\_CREDENTIAL* to indicate the desire to use this process's default credential.

**Returns**

Upon success, the **globus\_gram\_client\_job\_refresh\_credentials()** function returns *GLOBUS\_SUCCESS*, sends an proxy renew request the job named by *job\_contact*, parses the service response and performs a GSSAPI delegation to send a new credential to the job service. If an error occurs, **globus\_gram\_client\_job\_refresh\_credentials()** returns an integer error code indicating why it can't refresh the job service's credential. The return code may be any value defined by the *globus\_gram\_protocol\_error\_t* enumeration in addition to those listed below.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_job\_request (const char \* resource\_manager\_contact, const char \* description, int job\_state\_mask, const char \* callback\_contact, char \*\* job\_contact)

Send a job request to a GRAM service. The **globus\_gram\_client\_job\_request()** function sends a GRAM protocol message to a service to request that it start a job on behalf of the client. Unlike, **globus\_gram\_client\_register\_job\_request()**, **globus\_gram\_client\_job\_request()** blocks until the job request has been processed by the service.

**Parameters**

*resource\_manager\_contact* A NULL-terminated character string containing a **GRAM contact** that this function will contact. \
 *description* A pointer to a string containing the job request information formatted in RSL syntax. \
 *job\_state\_mask* A bitwise-or of the GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_\* states that the job manager will send job state notification messages for to the contact named by *callback\_contact*. \
 *callback\_contact* A GRAM listener contact that the job manager will send job state notification messages to. \
 *job\_contact* An output parameter pointing to a string that will be set to the job contact for this job. This value will only be set if the job request is successful or the two-phase commit protocol is being used and the return code is *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_WAITING\_FOR\_COMMIT*.

**Returns**

Upon success, **globus\_gram\_client\_job\_request()** returns GLOBUS\_SUCCESS and modifies the value pointed to by *job\_contact* as described above. If an error occurs, this function returns an integer error code and the value pointed to by *job\_contact*. In addition to the error codes described below, any #globus\_gram\_protocol\_error\_t value may be returned as a cause for the job to fail.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_job\_request\_with\_info (const char \* resource\_manager\_contact, const char \* description, int job\_state\_mask, const char \* callback\_contact, char \*\* job\_contact, globus\_gram\_client\_job\_info\_t \* info)

Send a job request to a GRAM service and parse extensions in the response. The **globus\_gram\_client\_job\_request\_with\_info()** function sends a GRAM protocol message to a service to request that it start a job on behalf of the client. Unlike, **globus\_gram\_client\_register\_job\_request\_with\_info()**, **globus\_gram\_client\_job\_request\_with\_info()** blocks until the job request has been processed by the service.

**Parameters**

*resource\_manager\_contact* A NULL-terminated character string containing a **GRAM contact** that this function will contact. \
 *description* A pointer to a string containing the job request information formatted in RSL syntax. \
 *job\_state\_mask* A bitwise-or of the GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_\* states that the job manager will send job state notification messages for to the contact named by *callback\_contact*. \
 *callback\_contact* A GRAM listener contact that the job manager will send job state notification messages to. \
 *job\_contact* An output parameter pointing to a string that will be set to the job contact for this job. This value will only be set if the job request is successful or the two-phase commit protocol is being used and the return code is *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_WAITING\_FOR\_COMMIT*. \
 *info* An output parameter pointing to a structure to hold the extensions in the GRAM response. The caller is responsible for destroying this by calling the **globus\_gram\_client\_job\_info\_destroy()** function.

**Returns**

Upon success, **globus\_gram\_client\_job\_request\_with\_info()** returns GLOBUS\_SUCCESS and modifies the values pointed to by *job\_contact* and *info* as described above. If an error occurs, this function returns an integer error code and the value pointed to by *job\_contact*. In addition to the error codes described below, any #globus\_gram\_protocol\_error\_t value may be returned as a cause for the job to fail.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_job\_signal (const char \* job\_contact, globus\_gram\_protocol\_job\_signal\_t signal, const char \* signal\_arg, int \* job\_status, int \* failure\_code)

Send a signal a GRAM job. The **globus\_gram\_client\_job\_signal()** function sends a signal message to a job managed by the GRAM service. Signals consist of a signal number and an optional string argument. The meanings of the signals supported by the GRAM job manager are defined in the GRAM Protocol documentation. Unlike **globus\_gram\_client\_register\_job\_signal()**, this function blocks until the signal has been delivered and acknowledged by the GRAM service.

**Parameters**

*job\_contact* The job contact string of the job manager to contact. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *signal* The signal code to send to the job manager. \
 *signal\_arg* Parameters for the signal, as described in the documentation for the #globus\_gram\_protocol\_job\_signal\_t enumeration. \
 *job\_status* An output parameter pointing to an integer to set to the status of the job after the signal has been processed. \
 *failure\_code* An output parameter pointing to an integer to set to the reason why the job has failed if the value pointed to by *job\_status* is set to *GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_FAILED* by this function.

**Returns**

Upon success, **globus\_gram\_client\_job\_signal()** returns GLOBUS\_SUCCESS after sending the signal and receiving a response and modifies the *job\_status* and *failure\_code* parameters as described above. If an error occurs, this function returns an integer error code indicating why the client could not signal the job.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

**See also**

**globus\_gram\_client\_register\_job\_signal()**

### int globus\_gram\_client\_job\_status (const char \* job\_contact, int \* job\_status, int \* failure\_code)

Send a status query to a GRAM job. The globus\_gram\_client\_status() function queries the current status of the job associated with the job contact, returning its current status, as well as the job's failure reason if it has failed in this function's return parameters. This function blocks until the service has responded to the status query.

**Parameters**

*job\_contact* The job contact string of the job to query. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *job\_status* An output parameter that points to an integer to be set to the current status of the job named by the *job\_contact* parameter. \
 *failure\_code* An output parameter that points to an integer to be set to the reason why the job failed if its current status is *GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_FAILED*. If the job has not failed, the value will be set to 0.

**Returns**

Upon success, the **globus\_gram\_client\_job\_status()** function returns *GLOBUS\_SUCCESS*, sends a job state query to the job named by *job\_contact* and parses the service response, modifying the values pointed to by *job\_status* and *failure\_code* as described above. If an error occurs, **globus\_gram\_client\_job\_status()** returns an integer error code.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_job\_status\_with\_info (const char \* job\_contact, globus\_gram\_client\_job\_info\_t \* info)

Send a status query to a GRAM job. The globus\_gram\_client\_status\_with\_info() function queries the current status of the job associated with the job contact, returning its current status, as well as the job's failure reason if it has failed in this function's return parameters. This function blocks until the service has responded to the status query.

**Parameters**

*job\_contact* The job contact string of the job to query. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *info* An output parameter that points to a globus\_gram\_client\_job\_info\_t structure which will be populated with the state information associated with the job named by the *job\_contact* parameter. The caller is responsible for calling **globus\_gram\_client\_job\_info\_destroy()** to free the state pointed to by this parameter if this function returns *GLOBUS\_SUCCESS*.

**Returns**

Upon success, the **globus\_gram\_client\_job\_status\_with\_info()** function returns *GLOBUS\_SUCCESS*, sends a job state query to the job named by *job\_contact* and parses the service response, modifying the structure pointed to by *info* as described above. If an error occurs, **globus\_gram\_client\_job\_status\_with\_info()** returns an integer error code.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_ping (const char \* resource\_manager\_contact)

Send a ping request to a GRAM service. The **globus\_gram\_client\_ping()** function sends a specially-formatted GRAM protocol message which checks to see if a Gatekeeper is running on a given PORT, and whether that Gatekeeper is configured to support the desired job manager service. This is used for diagnostic purposes.

**Parameters**

*resource\_manager\_contact* A NULL-terminated character string containing a **GRAM contact** that this function will contact.

**Returns**

Upon success, **globus\_gram\_client\_ping()** contacts the gatekeeper service and returns *GLOBUS\_SUCCESS*. If an error occurs, this function returns an integer error code.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_register\_get\_jobmanager\_version (const char \* resource\_manager\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_info\_callback\_func\_t info\_callback, void \* callback\_arg)

Get version information from a job manager without blocking. The **globus\_gram\_client\_register\_get\_jobmanager\_version()** function sends a message to a GRAM service which returns information about the job manager version to the function pointed to by the *info\_callback* function. Note that job managers prior to GT5 do not support the version request and so will return a GLOBUS\_GRAM\_PROTOCOL\_ERROR\_HTTP\_UNPACK\_FAILED error. This function blocks while processing this request.

**Parameters**

*resource\_manager\_contact* A NULL-terminated character string containing a **GRAM contact**. \
 *attr* A set of client attributes to use to contact the gatekeeper. If no custom attributes are needed, the caller should pass the value *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR*. \
 *info\_callback* A pointer to a function to call when the version request has completed or failed. \
 *callback\_arg* A pointer to application-specific data which will be passed to the function pointed to by *info\_callback* as its *user\_callback\_arg* parameter.

**Returns**

Upon success, **globus\_gram\_client\_register\_get\_jobmanager\_version()** function returns GLOBUS\_SUCCESS and begins processing the version request to contact *resource\_manager\_contact*; when complete, the *info\_callback* function will be called. If an error occurs, the integer error code will be returned and the value pointed to by the *extensions* parameter is undefined.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_BAD\_GATEKEEPER\_CONTACT* Bad gatekeeper contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NULL\_PARAMETER* NULL parameter \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol failed \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_register\_job\_callback\_registration (const char \* job\_contact, int job\_state\_mask, const char \* callback\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_nonblocking\_func\_t register\_callback, void \* register\_callback\_arg)

Register a new callback contact to be notified for job state changes. The **globus\_gram\_client\_register\_job\_callback\_registration()** function initiates the protocol to contact a GRAM service and request that it send subsequent job state callbacks to the client listening for callbacks at the contact url named by the *callback\_contact* parameter. This function returns as soon as it has validated its parameters and begun sending the GRAM message. When the registration is complete, the function pointed to by *register\_callback* is called.

**Parameters**

*job\_contact* The job contact string of the job to contact. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *job\_state\_mask* A bitwise-or of the GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_\* states that the job manager will send job state notification messages for to the contact named by *callback\_contact*. \
 *callback\_contact* A URL string containing a GRAM client callback. This string is normally be generated by a process calling **globus\_gram\_client\_callback\_allow()**. \
 *attr* A set of client attributes to use to contact the job. If no custom attributes are needed, the caller should pass the value *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR*. \
 *register\_callback* A pointer to a function to call when the registration request has completed or failed. \
 *register\_callback\_arg* A pointer to application-specific data which will be passed to the function pointed to by *register\_callback* as its *user\_callback\_arg* parameter.

**Returns**

Upon success, the **globus\_gram\_client\_register\_job\_callback\_registration()** function returns *GLOBUS\_SUCCESS*, begins to send a registration request to the job named by *job\_contact*, and schedules the *register\_callback* to be called once the registration completes or fails. If an error occurs, this function returns an integer error code indicating why it can't process the request.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

**See also**

**globus\_gram\_client\_job\_callback\_register()**

### int globus\_gram\_client\_register\_job\_callback\_unregistration (const char \* job\_contact, const char \* callback\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_nonblocking\_func\_t register\_callback, void \* register\_callback\_arg)

Unregister a callback contact to stop job state change notifications. The **globus\_gram\_client\_register\_job\_callback\_unregistration()** function initiates the protocol to contact a GRAM service and request that it stop sending job state callbacks to the client listening at the contact url named by the *callback\_contact* parameter. This function returns as soon as it has validated its parameters and begun sending the GRAM message. When the unregistration is complete, the function pointed to by *register\_callback* is called.

**Parameters**

*job\_contact* The job contact string of the job to contact. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *callback\_contact* A URL string containing a GRAM client callback. This string is normally be generated by a process calling **globus\_gram\_client\_callback\_allow()**. \
 *attr* A set of client attributes to use to contact the job. If no custom attributes are needed, the caller should pass the value *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR*. \
 *register\_callback* A pointer to a function to call when the registration request has completed or failed. \
 *register\_callback\_arg* A pointer to application-specific data which will be passed to the function pointed to by *register\_callback* as its *user\_callback\_arg* parameter.

**Returns**

Upon success, the **globus\_gram\_client\_register\_job\_callback\_unregistration()** function returns *GLOBUS\_SUCCESS*, begins sending an unregister request to the job named by *job\_contact* and schedules the function pointed to by the *register\_callback* parameter to be called. If an error occurs, **globus\_gram\_client\_register\_job\_callback\_unregistration()** returns an integer error code indicating why it can't process the unregister request.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

**See also**

**globus\_gram\_client\_job\_callback\_unregister()**

### int globus\_gram\_client\_register\_job\_cancel (const char \* job\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_nonblocking\_func\_t register\_callback, void \* register\_callback\_arg)

Cancel a GRAM job. The **globus\_gram\_client\_register\_job\_cancel()** function sends a message to a GRAM service to cancel a GRAM job. Depending on the job's current state, this cancellation may be immediate or require a delay for interacting with the LRM servicing the job. In either case, this function returns as soon as it is able to start sending the message. Notification when the job has been successfully canceled will be sent to all client contacts registered for notifications after the cancellation has been completely processed.

**Parameters**

*job\_contact* A NULL-terminated character string containing a GRAM job contact that this function will contact to cancel the job. \
 *attr* A set of client attributes to use to contact the job. If no custom attributes are needed, the caller should pass the value *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR*. \
 *register\_callback* A pointer to a function to call when the job\_request request has completed or failed. \
 *register\_callback\_arg* A pointer to application-specific data which will be passed to the function pointed to by *register\_callback* as its *user\_callback\_arg* parameter.

**Returns**

Upon succes, **globus\_gram\_client\_register\_job\_cancel()** returns *GLOBUS\_SUCCESS* if the cancellation was successful posted to the service. If an error occurs, **globus\_gram\_client\_register\_job\_cancel()** returns one an integer error code indicating why it could not cancel the job.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

**See also**

**globus\_gram\_client\_job\_cancel()**

### int globus\_gram\_client\_register\_job\_refresh\_credentials (char \* job\_contact, gss\_cred\_id\_t creds, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_nonblocking\_func\_t register\_callback, void \* register\_callback\_arg)

Delegate a new credential to a job. The **globus\_gram\_client\_register\_job\_refresh\_credentials()** function sends a 'renew' signal to a GRAM service and then initiates the delegation of a new credential to the job manager and job. This prevents errors that can occur when a credential expires. This function returns as soon as it has determined that its parameters are valid and it has begun to send the message to the GRAM service.

**Parameters**

*job\_contact* The job contact string of the job to contact. This is the same value returned from **globus\_gram\_client\_job\_request()**. \
 *creds* A GSSAPI credential handle which will be used to authenticate with the job manager and sign the delegated credential. This parameter's value may be set to *GSS\_C\_NO\_CREDENTIAL* to indicate the desire to use this process's default credential. \
 *attr* A set of client attributes to use to contact the job. If no custom attributes are needed, the caller should pass the value *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR*. \
 *register\_callback* A pointer to a function to call when the status request has completed or failed. \
 *register\_callback\_arg* A pointer to application-specific data which will be passed to the function pointed to by *register\_callback* as its *user\_callback\_arg* parameter.

**Returns**

Upon success, the **globus\_gram\_client\_job\_refresh\_credentials()** function returns *GLOBUS\_SUCCESS* and begins sending the 'renew' request to the GRAM service. If an error occurs, **globus\_gram\_client\_job\_refresh\_credentials()** returns an integer error code indicating why it can't refresh the job service's credential. The return code may be any value defined by the *globus\_gram\_protocol\_error\_t* enumeration in addition to those listed below.

**Return values**

*GLOBUS\_GRAM\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_register\_job\_request (const char \* resource\_manager\_contact, const char \* description, int job\_state\_mask, const char \* callback\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_nonblocking\_func\_t register\_callback, void \* register\_callback\_arg)

Send a job request to a GRAM service. The **globus\_gram\_client\_register\_job\_request()** function sends a GRAM protocol message to a service to request that it start a job on behalf of the client.

If **globus\_gram\_client\_register\_job\_request()** determines that this request could not be processed before contacting the gatekeeper (for example, a malformed *resource\_manager\_contact*), it will return an error, and the *regiser\_callback* function will not be called. Otherwise, the success or failure an be determined by the *operation\_failure\_code* parameter to the function pointed to by the *register\_callback* parameter.

**Parameters**

*resource\_manager\_contact* A NULL-terminated character string containing a **GRAM contact** that this function will contact. \
 *description* A pointer to a string containing the job request information formatted in RSL syntax. \
 *job\_state\_mask* A bitwise-or of the GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_\* states that the job manager will send job state notification messages for to the contact named by *callback\_contact*. \
 *callback\_contact* A GRAM listener contact that the job manager will send job state notification messages to. \
 *attr* A set of client attributes to use to contact the gatekeeper. If no custom attributes are needed, the caller should pass the value *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR*. \
 *register\_callback* A pointer to a function to call when the job\_request request has completed or failed. \
 *register\_callback\_arg* A pointer to application-specific data which will be passed to the function pointed to by *register\_callback* as its *user\_callback\_arg* parameter.

**Returns**

Upon success, **globus\_gram\_client\_register\_job\_request()** returns GLOBUS\_SUCCESS and the *register\_callback* function will be called once the job request operation completes. If an error occurs, this function returns an integer error code and the function pointed to by the *register\_callback* parameter will not be called.

**Return values**

*GLOBUS\_SUCCESS* Success \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* Out of memory \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* Protocol error \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* Invalid job contact \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* Invalid request \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* No resources

### int globus\_gram\_client\_register\_job\_request\_with\_info (const char \* resource\_manager\_contact, const char \* description, int job\_state\_mask, const char \* callback\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_info\_callback\_func\_t callback, void \* callback\_arg)

Send a job request to a GRAM service with extensions-aware callback. The **globus\_gram\_client\_register\_job\_request\_with\_info()** function sends a GRAM protocol message to a service to request that it start a job on behalf of the client.

If **globus\_gram\_client\_register\_job\_request\_with\_info()** determines that this request could not be processed before contacting the gatekeeper (for example, a malformed *resource\_manager\_contact*), it will return an error, and the *callback* function will not be called. Otherwise, the success or failure an be determined by the *operation\_failure\_code* parameter to the function pointed to by the *callback* parameter. The difference between this function and **globus\_gram\_client\_register\_job\_request() is the function signature of the callback function.**

**Parameters**

*resource\_manager\_contact* **A NULL-terminated character string containing a GRAM contact that this function will contact.** \
 *description* **A pointer to a string containing the job request information formatted in RSL syntax.** \
 *job\_state\_mask* **A bitwise-or of the GLOBUS\_GRAM\_PROTOCOL\_JOB\_STATE\_\* states that the job manager will send job state notification messages for to the contact named by** *callback\_contact***.** \
 *callback\_contact* **A GRAM listener contact that the job manager will send job state notification messages to.** \
 *attr* **A set of client attributes to use to contact the gatekeeper. If no custom attributes are needed, the caller should pass the value** *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR***.** \
 *callback* **A pointer to a function to call when the job\_request request has completed or failed.** \
 *callback\_arg* **A pointer to application-specific data which will be passed to the function pointed to by** *callback* **as its** *user\_callback\_arg* **parameter.**

**Returns**

**Upon success, globus\_gram\_client\_register\_job\_request\_with\_info() returns GLOBUS\_SUCCESS and the** *callback* **function will be called once the job request operation completes. If an error occurs, this function returns an integer error code and the function pointed to by the** *callback* **parameter will not be called.**

**Return values**

*GLOBUS\_SUCCESS* **Success** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* **Out of memory** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* **Protocol error** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* **Invalid job contact** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* **Invalid request** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* **No resources**

### int globus\_gram\_client\_register\_job\_signal (const char \* job\_contact, globus\_gram\_protocol\_job\_signal\_t signal, const char \* signal\_arg, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_nonblocking\_func\_t register\_callback, void \* register\_callback\_arg)

**Send a signal a GRAM job. The globus\_gram\_client\_register\_job\_signal() function sends a signal message to a job managed by the GRAM service. Signals consist of a signal number and an optional string argument. The meanings of the signals supported by the GRAM job manager are defined in the GRAM Protocol documentation. This function returns as soon as it has determined that its parameters are valid and it has begun to send the message to the GRAM service.**

**Parameters**

*job\_contact* **The job contact string of the job manager to contact. This is the same value returned from globus\_gram\_client\_job\_request().** \
 *signal* **The signal code to send to the job manager.** \
 *signal\_arg* **Parameters for the signal, as described in the documentation for the #globus\_gram\_protocol\_job\_signal\_t enumeration.** \
 *attr* **A set of client attributes to use to contact the job. If no custom attributes are needed, the caller should pass the value** *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR***.** \
 *register\_callback* **A pointer to a function to call when the signal request has completed or failed.** \
 *register\_callback\_arg* **A pointer to application-specific data which will be passed to the function pointed to by** *register\_callback* **as its** *user\_callback\_arg* **parameter.**

**Returns**

**Upon success, globus\_gram\_client\_job\_register\_signal() returns GLOBUS\_SUCCESS after beginning to send the signal to the GRAM job and registers the** *register\_callback* **function to be called once that has completed. If an error occurs, this function returns an integer error code indicating why the client could not signal the job.**

**Return values**

*GLOBUS\_GRAM\_SUCCESS* **Success** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* **Out of memory** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* **Protocol error** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* **Invalid job contact** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* **Invalid request** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* **No resources**

**See also**

**globus\_gram\_client\_register\_job\_signal()**

### int globus\_gram\_client\_register\_job\_status (const char \* job\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_nonblocking\_func\_t register\_callback, void \* register\_callback\_arg)

**Send a status query to a GRAM job. The globus\_gram\_client\_register\_job\_status() function initiates a query of the current status of the job associated with the** *job* **contact parameter. The job's status and failure code are passed to the function pointed to by the** *register\_callback* **parameter. This function returns as soon as it has begun requesting the job status.**

**Parameters**

*job\_contact* **The job contact string of the job to query. This is the same value returned from globus\_gram\_client\_job\_request().** \
 *attr* **A set of client attributes to use to contact the job. If no custom attributes are needed, the caller should pass the value** *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR***.** \
 *register\_callback* **A pointer to a function to call when the status request has completed or failed.** \
 *register\_callback\_arg* **A pointer to application-specific data which will be passed to the function pointed to by** *register\_callback* **as its** *user\_callback\_arg* **parameter.**

**Returns**

**Upon success, the globus\_gram\_client\_register\_job\_status() function returns** *GLOBUS\_SUCCESS* **and begins to send a job state query to the job named by** *job\_contact* **and registers the function pointed to by the** *register\_callback* **parameter to be called once the status query terminates or fails. If an error occurs, globus\_gram\_client\_register\_job\_status() returns an integer error code.**

**Return values**

*GLOBUS\_GRAM\_SUCCESS* **Success** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* **Out of memory** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* **Protocol error** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* **Invalid job contact** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* **Invalid request** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* **No resources** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NULL\_PARAMETER* **Null parameter**

### int globus\_gram\_client\_register\_job\_status\_with\_info (const char \* job\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_info\_callback\_func\_t info\_callback, void \* callback\_arg)

**Send a status query to a GRAM job. The globus\_gram\_client\_register\_job\_status\_with\_info() function initiates a query of the current status of the job associated with the** *job* **contact parameter. Job information is returned via the** *job\_info* **parameter passed to the function pointed to by the** *info\_callback* **parameter. This function returns as soon as it has begun requesting the job status.**

**Parameters**

*job\_contact* **The job contact string of the job to query. This is the same value returned from globus\_gram\_client\_job\_request().** \
 *attr* **A set of client attributes to use to contact the job. If no custom attributes are needed, the caller should pass the value** *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR***.** \
 *info\_callback* **A pointer to a function to call when the status request has completed or failed.** \
 *callback\_arg* **A pointer to application-specific data which will be passed to the function pointed to by** *info\_callback* **as its** *user\_callback\_arg* **parameter.**

**Returns**

**Upon success, the globus\_gram\_client\_register\_job\_status\_with\_info() function returns** *GLOBUS\_SUCCESS* **and begins to send a job state query to the job named by** *job\_contact* **and registers the function pointed to by the** *info\_callback* **parameter to be called once the status query terminates or fails. If an error occurs, globus\_gram\_client\_register\_job\_status\_with\_info() returns an integer error code.**

**Return values**

*GLOBUS\_GRAM\_SUCCESS* **Success** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* **Out of memory** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* **Protocol error** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* **Invalid job contact** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* **Invalid request** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* **No resources** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NULL\_PARAMETER* **Null parameter**

### int globus\_gram\_client\_register\_ping (const char \* resource\_manager\_contact, globus\_gram\_client\_attr\_t attr, globus\_gram\_client\_nonblocking\_func\_t register\_callback, void \* register\_callback\_arg)

**Send a ping request to a GRAM service. The globus\_gram\_client\_register\_ping() function sends a specially-formatted GRAM protocol message which checks to see if a Gatekeeper is running on a given PORT, and whether that Gatekeeper is configured to support the desired job manager service. This is used for diagnostic purposes.**

**If globus\_gram\_client\_register\_ping() determines that this request could not be processed before contacting the gatekeeper (for example, a malformed** *resource\_manager\_contact***), it will return an error, and the** *regiser\_callback* **function will not be called. Otherwise, the success or failure an be determined by the** *operation\_failure\_code* **parameter to the function pointed to by the** *register\_callback* **parameter.**

**Parameters**

*resource\_manager\_contact* **A NULL-terminated character string containing a GRAM contact that this function will contact.** \
 *attr* **A set of client attributes to use to contact the gatekeeper. If no custom attributes are needed, the caller should pass the value** *GLOBUS\_GRAM\_CLIENT\_NO\_ATTR***.** \
 *register\_callback* **A pointer to a function to call when the ping request has completed or failed.** \
 *register\_callback\_arg* **A pointer to application-specific data which will be passed to the function pointed to by** *register\_callback* **as its** *user\_callback\_arg* **parameter.**

**Returns**

**Upon success, globus\_gram\_client\_register\_ping() returns GLOBUS\_SUCCESS and the** *register\_callback* **function will be called once the ping operation completes. If an error occurs, this function returns an integer error code and the function pointed to by the** *register\_callback* **parameter will not be called.**

**Return values**

*GLOBUS\_SUCCESS* **Success** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_MALLOC\_FAILED* **Out of memory** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_PROTOCOL\_FAILED* **Protocol error** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_JOB\_CONTACT* **Invalid job contact** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_INVALID\_REQUEST* **Invalid request** \
 *GLOBUS\_GRAM\_PROTOCOL\_ERROR\_NO\_RESOURCES* **No resources**

## Author

**Generated automatically by Doxygen for globus\_gram\_client from the source code.**
