12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Descriptions of the Library Routines 2PXFWAITPOSIX Subroutine: Waits for a child process. This subroutine is only available on Linux*systems.Module: USE IFPOSIXSyntaxCALL PXFWAIT (istat, iretpid, ierror)istat(Output) INTEGER(4). The returned status of the child process.iretpid(Output) INTEGER(4). The process ID of the stopped child process.ierror(Output) INTEGER(4). The error status.If successful, ierror is set to zero; otherwise, an error code.The PXFWAIT subroutine suspends execution of the current process until a child has exited, oruntil a signal is delivered whose action terminates the current process or calls a signal handlingroutine. If the child has already exited by the time of the call (a "zombie" process), a return isimmediately made. Any system resources used by the child are freed.The subroutine returns in iretpid the value of the process ID of the child that exited, or zero if nochild was available. The returned value in istat can be used in subroutines IPXFWEXITSTATUS,IPXFWSTOPSIG, IPXFWTERMSIG, PXFWIFEXITED, PXFWIFSIGNALLED, andPXFWIFSTOPPED.See Also: “PXFWAITPID”, “IPXFWEXITSTATUS”, “IPXFWSTOPSIG”, “IPXFWTERMSIG”,“PXFWIFEXITED”, “PXFWIFSIGNALED”, “PXFWIFSTOPPED”Exampleprogram t1use ifposixinteger(4) ipid, istat, ierror, ipid_ret, istat_retprint *," the child process will be born"call PXFFORK(IPID, IERROR)call PXFGETPID(IPID_RET,IERROR)if(IPID.EQ.0) thenprint *," I am a child process"print *," My child's pid is", IPID_RETcall PXFGETPPID(IPID_RET,IERROR)2-357

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!