spawn 常量spawn Constants


#include <process.h>  


mode 参数决定在生成操作前或操作期间由调用进程执行的操作。The mode argument determines the action taken by the calling process before and during a spawn operation. mode 可能具有以下值:The following values for mode are possible:

常量Constant 含义Meaning
_P_OVERLAY 使用新进程覆盖调用进程,销毁调用进程(与 _exec 调用的效果相同)。Overlays calling process with new process, destroying calling process (same effect as _exec calls).
_P_WAIT 挂起调用线程,直至执行完新进程(同步 _spawn)。Suspends calling thread until execution of new process is complete (synchronous _spawn).
_P_NOWAIT, _P_NOWAITO_P_NOWAIT, _P_NOWAITO 继续将调用进程与新进程一起执行(异步 _spawn)。Continues to execute calling process concurrently with new process (asynchronous _spawn).
_P_DETACH 继续执行调用进程;在无法访问控制台或键盘的后台运行新进程。Continues to execute calling process; new process is run in background with no access to console or keyboard. 针对新进程调用 _cwait 将失败。Calls to _cwait against new process will fail. 这是一个异步 _spawnThis is an asynchronous _spawn.

另请参阅See Also

_spawn、_wspawn 函数 _spawn, _wspawn Functions
全局常量Global Constants