📄 win32-process.sml
字号:
(* win32-process.sml * * COPYRIGHT (c) 1998 Bell Labs, Lucent Technologies. * * Simulate some of the Posix.Process structure on Win32 machines *)structure Win32Process : sig type pid datatype exit_status = SUCCESS | FAIL val createProcess : string -> pid val waitForSingleObject : pid -> exit_status option end = struct type pid = Word32.word (* actually, a handle *) datatype exit_status = SUCCESS | FAIL fun cfun x = Unsafe.CInterface.c_function "WIN32-PROCESS" x val createProcess : string -> pid = cfun "create_process" val wait_for_single_object : pid -> pid option = cfun "wait_for_single_object" fun waitForSingleObject (p : pid) = (case (wait_for_single_object p) of NONE => NONE | SOME (v) => if v=0w0 then SOME FAIL else SOME SUCCESS (* end of case *)) end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -