12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Descriptions of the Library Routines 2CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBExampleprogram 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 programPXFFDOPENPOSIX Subroutine: Opens an external unit.Module: USE IFPOSIX2-285

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

Saved successfully!

Ooh no, something went wrong!