你如何在 Perl 中启动后台进程? [英] How do you start a background process in Perl?

查看:49
本文介绍了你如何在 Perl 中启动后台进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想弄清楚如何在 perl 脚本中启动后台进程(在 Windows 上).换句话说,我不希望脚本在重新获得控制权之前等待子进程完成.有没有一种简单的方法可以在短短几行代码中做到这一点?我已经查看了系统命令的 perldoc,但它似乎没有做我想要的..

I'm trying to figure out how to start a background process in a perl script (on Windows). In other words, I don't want the script to wait for the child process to complete before regaining control. Is there an easy way to do this in just a few lines of code? I've looked at perldoc for the system command, but it doesn't seem to do what I want..

推荐答案

perlport 中查看系统:"system(1,@args) 产生一个外部进程并立即返回其进程指示符,而不等待它终止...(Win32)"

See system in perlport: "system(1,@args) spawns an external process and immediately returns its process designator, without waiting for it to terminate...(Win32)"

这篇关于你如何在 Perl 中启动后台进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆