我是否需要使用特定的退出碼?我該如何輕輕地殺死ActiveState Perl中的一個進程?
Win32::Process::Create(
$ProcessObj,
"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe",
"firefox -no-remote -P $prof_name",
0,
NORMAL_PRIORITY_CLASS,
".")|| die ErrorReport();
$ProcessObj->kill(0);
這樣,它會殺死但不會輕微地產生Firefox配置文件的問題。
如果是窗口的應用程序(而不是一個控制檯應用程序),您可以發送一個戒菸消息到其消息隊列 – ikegami