{-# LINE 1 "System/Posix/Process/Internals.hsc" #-}{-# LANGUAGE CApiFFI #-}{-# LANGUAGE Trustworthy #-}moduleSystem.Posix.Process.Internals(pPrPr_disableITimers,c_execvpe,decipherWaitStatus,ProcessStatus(..))whereimportForeignimportForeign.CimportSystem.ExitimportSystem.IO.ErrorimportGHC.Conc(Signal){-# LINE 20 "System/Posix/Process/Internals.hsc" #-}-- | The exit status of a processdataProcessStatus=ExitedExitCode-- ^ the process exited by calling-- @exit()@ or returning from @main@|TerminatedSignalBool-- ^ the process was terminated by a-- signal, the @Bool@ is @True@ if a core-- dump was produced---- @since 2.7.0.0|StoppedSignal-- ^ the process was stopped by a signalderiving(Eq,Ord,Show)-- this function disables the itimer, which would otherwise cause confusing-- signals to be sent to the new process.foreignimportcapiunsafe"Rts.h stopTimer"pPrPr_disableITimers::IO()foreignimportccallunsafe"__hsunix_execvpe"c_execvpe::CString->PtrCString->PtrCString->IOCInt{-# LINE 48 "System/Posix/Process/Internals.hsc" #-}decipherWaitStatus::CInt->IOProcessStatusdecipherWaitStatuswstat=ifc_WIFEXITEDwstat/=0thendoletexitstatus=c_WEXITSTATUSwstatifexitstatus==0thenreturn(ExitedExitSuccess)elsereturn(Exited(ExitFailure(fromIntegralexitstatus)))elsedoifc_WIFSIGNALEDwstat/=0thendolettermsig=c_WTERMSIGwstatletcoredumped=c_WCOREDUMPwstat/=0return(Terminatedtermsigcoredumped)elsedoifc_WIFSTOPPEDwstat/=0thendoletstopsig=c_WSTOPSIGwstatreturn(Stoppedstopsig)elsedoioError(mkIOErrorillegalOperationErrorType"waitStatus"NothingNothing)foreignimportcapiunsafe"HsUnix.h WIFEXITED"c_WIFEXITED::CInt->CIntforeignimportcapiunsafe"HsUnix.h WEXITSTATUS"c_WEXITSTATUS::CInt->CIntforeignimportcapiunsafe"HsUnix.h WIFSIGNALED"c_WIFSIGNALED::CInt->CIntforeignimportcapiunsafe"HsUnix.h WTERMSIG"c_WTERMSIG::CInt->CIntforeignimportcapiunsafe"HsUnix.h WIFSTOPPED"c_WIFSTOPPED::CInt->CIntforeignimportcapiunsafe"HsUnix.h WSTOPSIG"c_WSTOPSIG::CInt->CIntforeignimportcapiunsafe"HsUnix.h WCOREDUMP"c_WCOREDUMP::CInt->CInt{-# LINE 95 "System/Posix/Process/Internals.hsc" #-}

AltStyle によって変換されたページ (->オリジナル) /