【发布时间】:2010-10-28 18:26:58
【问题描述】:
我有一个在 Mac OS 10.5.8 上运行的程序。该程序运行一个连续的循环,它安装一个图像,安装一个浏览器插件并再次卸载图像。如果我让这个程序继续运行,我最终会遇到以下错误“fork:资源暂时不可用”。在活动监视器中,我可以看到数百个名为 diskimages-helper 的进程正在运行。有谁知道为什么会发生这种情况以及如何避免它?以下是我在程序的一个周期中使用的命令。
# First I remove the plugin
rm -rf "/Library/Internet Plug-Ins/my.plugin"
# If the mount exists I unmount it
hdiutil unmount [mount] -force
# If that doesnt work I detach the device
hdiutil detach [device] -force
# Then I mount the image
hdiutil mount [image]
# I install the plugin
installer -package [package] -target /
# Unmount
hdiutil unmount [mount] -force
# And if necessary detach
hdiutil detach [device] -force
【问题讨论】:
-
您重复安装同一个浏览器插件?
-
该程序做了一些其他的事情使它有用:) 它下载插件的不同版本并运行一些测试
标签: macos terminal volume detach