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.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>istat(Output) INTEGER(4). The status of the child process (obtained from PXFWAIT orPXFWAITPID).Results:The result type is logical. The result value is .TRUE. if the child process has exited normally;otherwise, .FALSE..See Also: “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)print *," The pid of my parent is",IPID_RETprint *," Now I have exited with code 0xABCD"call PXFEXIT(Z'ABCD')elseprint *," I am a parent process"print *," My parent pid is ", IPID_RETprint *," I am creating the process with pid", IPIDprint *," Now I am waiting for the end of the child process"call PXFWAIT(ISTAT, IPID_RET, IERROR)print *," The child with pid ", IPID_RET," has exited"if( PXFWIFEXITED(ISTAT) ) thenprint *, " The child exited normally"istat_ret = IPXFWEXITSTATUS(ISTAT)print 10," The low byte of the child exit code is", istat_retend ifend if10 FORMAT (A,Z)end program2-360

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

Saved successfully!

Ooh no, something went wrong!