我一直在关注 C 编码的在线教程,代码使用的是 Apache APR 库。它使用 apr_proc_t 结构来执行外部应用程序。我对这个功能感到困惑,有人可以解释一下这个功能的含义:
apr_status_t apr_procattr_cmdtype_set ( apr_procattr_t * attr,
apr_cmdtype_e cmd
)
Set what type of command the child process will call.
Parameters:
attr The procattr we care about.
cmd The type of command. One of:
APR_SHELLCMD -- Anything that the shell can handle
APR_PROGRAM -- Executable program (default)
APR_PROGRAM_ENV -- Executable program, copy environment
APR_PROGRAM_PATH -- Executable program on PATH, copy env