#include <sys/types.h> #include <sys/socket.h> int givedescriptor(int descriptor, char *target_job)
The givedescriptor() function is used to pass a descriptor from one i5/OS job to another i5/OS job.
To give a descriptor, the source thread must be running under one of the following user profiles:
The job user identity is the name of the user profile by which a job is known to other jobs. It is described in more detail in the Work Management topic.
givedescriptor() returns an integer. Possible values are:
When givedescriptor() fails, errno can be set to one of the following:
[EACCES] | Permission denied.
The job does not have the appropriate privileges required to give the descriptor. |
[EBADF] | Descriptor not valid. |
[EFAULT] | Bad address.
The system detected an address which was not valid while attempting to access the target_job parameter. |
[EINVAL] | Parameter not valid.
This error code indicates one of the following:
|
[EIO] | Input/output error. |
[EOPNOTSUPP] | Operation not supported.
The underlying instance represented by the descriptor does not support passing access rights. |
[EUNKNOWN] | Unknown system state. |
Message ID | Error Message Text |
---|---|
CPE3418 E | Possible APAR condition or hardware failure. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
CPFA081 E | Unable to set return value or error code. |
It is the responsibility of the application programmer to privately pass this information from the target job to the job that issues the givedescriptor(). One possible method that could be used to exchange this information is to use data queues.
Top | UNIX-Type APIs | APIs by category |