如何从 Perl 启动程序作为单独的进程?

发布于 2024-12-17 20:22:40 字数 474 浏览 4 评论 0原文

可能的重复:
如何在 Perl 中触发并忘记进程?< /a>

我正在寻找一种从 Perl 脚本调用新进程的方法,这将使启动的程序和启动该程序的 Perl 脚本同时继续工作。

该计划是 SIPp(如果它很重要)。

谢谢。

Possible Duplicate:
How can I fire and forget a process in Perl?

I'm looking for a way to invoke a new process from a Perl script, that will let a launched program and a Perl script, from which it's launched, proceed to work concurrently.

The program is SIPp, if it's important.

Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

无尽的现实 2024-12-24 20:22:40

如果您确实想要单独的进程,那么另一个选择是 forkexec

if (fork) {
  # In the parent program
  # Continue as usual
  ...
} else {
  # In the new child program
  # Replace with another program
  exec $some_other_program;
}

If you actually want separate processes, then another option is fork and exec.

if (fork) {
  # In the parent program
  # Continue as usual
  ...
} else {
  # In the new child program
  # Replace with another program
  exec $some_other_program;
}
余生再见 2024-12-24 20:22:40

SIPp 有“-bg”命令行参数。

此参数以后台模式启动 SIPp。

SIPp has "-bg" commandline parameter.

This parameter launches SIPp in background mode.

鯉魚旗 2024-12-24 20:22:40

在Windows系统中您可以使用“启动”命令。

例如:

启动记事本

启动 /d"C\Program Files\Sipp3.1" sipp.exe -sn uac

In Windows system you may use "start" command.

For example:

start notepad

OR

start /d"C\Program Files\Sipp3.1" sipp.exe -sn uac

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文