pipexec 是否创建了一些子进程?

Does pipexec create some subprocesses?

我正在使用 pipexec 工具来管理进程之间的通信。 我的任务要求我检索通信进程的 ID。

示例:

pipexec -- [ A ./cmd1 ] [ B ./cmd2 ] "{A:1>B:0}" "{B:1>A:0}" &

然后:

ps --ppid xxxx

其中 xxxx 是 pipexec 进程的 pid。 我可以确定会显示 2 个进程,或者 pipexec 运行 某个内部进程是否有可能在 运行ning 的某个时间点出现?

来自 pipexec 手册页:

pipexec creates an arbitrary network (directed graph) of processes and pipes in between - even cycles are possible. It overcomes the shortcomings of shells that are typically only able to create non cyclic trees.

pipexec also monitors all it's child processes and is able to restart the whole network of processes and pipes if one crashes. Therefore pipexec can be used in SYSV-init or systemd configuration to run a network of processes.

因此,如果 pipexec 重新启动 "network" 时出现故障,可能会创建比您想象的更多的进程。 但是假设没有失败,pipexec 似乎只创建了您指定的进程数。实验上,我看到:

$ ps -af
UID        PID  PPID  C STIME TTY          TIME CMD
usr  6531 29605  0 13:02 pts/9    00:00:00 pipexec -- [ A /bin/sleep 30 ] [ B /bin/sleep 40 ]
usr  6532  6531  0 13:02 pts/9    00:00:00 /bin/sleep 30
usr  6533  6531  0 13:02 pts/9    00:00:00 /bin/sleep 40

当 运行:

pipexec -- [ A /bin/sleep 30 ] [ B /bin/sleep 40 ]

这可能是也可能不是普遍正确的。但是我在文档中找不到任何关于此的内容。