如何使程序在ash shell中在后台运行

问题描述 投票:2回答:1

我需要SSH到嵌入式设备,启动后台程序,然后断开连接并保持后台进程运行。问题在于嵌入式设备正在使用ash shell(不支持bash或其他任何东西),因此nohup和screen不可用。我还没有找到任何断开ash中进程的方法。有什么办法用灰做吗?

linux shell ssh embedded-linux ash
1个回答
0
投票

替代:

nohup command &

使用巧妙的括号:

(( command & ) & )

而且如果您想删除stdin / stdout:

(( command 0<&- &>/dev/null &) &)
© www.soinside.com 2019 - 2024. All rights reserved.