守护程序创建子进程,而cfengine继续其愉快的“旅程”。
然而,对于不创建子进程的守护程序(并且这包括大多数内部守护程序软件),cfengine需要特殊帮助。
For the non-forking daemons, however (and this includes most in-house daemon software), cfengine needs special help.
使用fork创建一个具有新的PID的子进程。
f跟踪通过fork或vfork创建的所有子进程,跟踪输出中包括它们的信号、错误和系统调用。
F follows all children created by fork or vfork and includes their signals, faults, and system calls in the trace output.
特别是,当您仅需要创建许多子进程并对响应进行侦听时,那么标准库子进程模块可能使用起来更加容易。
The standard library subprocess module in particular can be much simpler to deal with if you only require forking many processes and listening for a response.
子例程就绪后,主程序逻辑将允许用户创建音调序列,或以守护进程模式运行来侦听音调命令和执行命令。
With the subroutines in place, the main program logic will allow the user to create a tone sequence, or will run in daemon mode to listen for tones and execute commands.
如果希望创建一个单独的进程,您必须首先运行fork,然后在子进程中执行(exec)新的二进制文件。
If you want to create a separate process, you must first fork, and then exec the new binary within the child process.
fork会创建一个子进程,与父进程相比只是PID和PPID不同;实际上,资源利用设为0。
Fork creates a child process that differs from the parent process only in its PID and PPID; in fact, the resource utilizations are set to 0.
当您再次使用ps查看进程表时,您将看到,对于这个进程以及它通过 fork 系统调用创建的子进程,它们的优先级都不再是缺省值。
When you look at the process table again, you'll see that the priority of this process has changed from its default as well as the child process that was forked from it (ps).
创建的所有子进程链表的头。
线程作为创建它们的进程的子节点列出。
Threads are listed as child nodes of the process that created them.
改命令启动GDB并将其作为Emacs的子进程,其输入输出都在一个新创建的Emacs缓冲中。
This command starts GDB as a subprocess of Emacs, with input and output through a newly created Emacs buffer.
改命令启动GDB并将其作为Emacs的子进程,其输入输出都在一个新创建的Emacs缓冲中。
This command starts GDB as a subprocess of Emacs, with input and output through a newly created Emacs buffer.
应用推荐