发送命令后台进程 [英] Send command to a background process
本文介绍了发送命令后台进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个previously运行的是在与1111的PID(或一些其它任意数)后台运行过程(process1.sh)。我怎么能发送类似命令选项1选项到该进程的1111 PID?我不想开始新的process1.sh!
I have a previously running process (process1.sh) that is running in the background with a PID of 1111 (or some other arbitrary number). How could I send something like "command option1 option2" to that process with a PID of 1111? I DO NOT want to start a new process1.sh!
推荐答案
命名管道是你的朋友。请参阅文章 Linux杂志:使用命名管道(FIFO)使用bash 。
Named Pipes are your friend. See the article Linux Journal: Using Named Pipes (FIFOs) with Bash.
这篇关于发送命令后台进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文