Note: This function can only be used in an IBM® i PASE
program. See the IBM PASE for i topic collection for more
information about creating IBM PASE for i programs.
The _RETURN() function returns to the ILE caller that called IBM PASE for i in
this job, without exiting the IBM PASE for i program. IBM PASE for i remains active
in the job, so APIs Qp2CallPase and Qp2CallPase2 can be used to call procedures
in the IBM PASE for i program.
Parameters
None.
Authorities
None.
Return Value
_RETURN does not return to the IBM PASE for i program if it
successfully returns to the ILE caller. A function result of -1 with an errno
is returned for any error.
Error Conditions
EPERM is set if _RETURN is used in a fork child process or
in an IBM PASE for i program that is currently running multiple threads.
Usage Notes
The system provides two IBM PASE for i programs, /usr/lib/start32 (for
32-bits) and /usr/lib/start64 (for 64-bits), that return without exiting
immediately after initializing the standard C library (libc.a) and pthreads
library (libpthreads.a).
The system ends any IBM PASE for i program when it destroys the activation
group that called API Qp2RunPase. API program QP2SHELL always calls Qp2RunPase
in a *NEW activation group that is destroyed before return, so QP2SHELL is not
useful for running an IBM PASE for i program that returns without exiting.