【发布时间】:2011-09-06 05:51:03
【问题描述】:
我的 .bash_profile 文件中有 2 个别名,其中包含:
alias chrome="/Applications/Google\\ \\Chrome.app/Contents/MacOS/Google\\ \\Chrome"
alias chromex="chrome --disable-web-security"
但是在运行时,它会打开 Chrome,但会一直保持终端窗口...一旦我关闭终端窗口,它也会关闭 chrome。
有没有办法让它在后台运行?
我记得我将它用于thin 网络服务器和thin start -d 或thin start --daemonize?
谢谢
更新
除了 James 的回答之外,我还发现了 nohup 命令行,通过将 & 附加到 nohup 命令,我可以毫无问题地退出终端:
$ nohup chromex &
默认输出写入nohup.out文件
要停止工作,我可以运行 ps ax,通过正确的命令找到 PID,然后找到 kill -9 PID
【问题讨论】:
标签: google-chrome daemon arguments background-process