dongpu2727 2016-08-10 05:36
浏览 195

在网站上执行shell脚本:始终在单个实例中运行

I'm calling a bash script over a website using html/php. There are multiple html-buttons available that always start the same script, but with different arguments. The problem is, that every time I start to call the script by clicking on such a button, a new instance of the script is opened.

Is it possible to kind of "pick up" the running instance of the script and not starting a new one?

Note: i can't just exit the active instance of the script and starting a new one, as serveral background functions are running which would be stopped then too.

  • 写回答

1条回答 默认 最新

  • duanlei8119 2016-08-10 08:43
    关注

    Thanks to @thiru for the hint! I used the instruction from here using mkfifo to create a pipe and then just echoing arguments into the pipe.

    评论

报告相同问题?

悬赏问题

  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 matlab求解平差
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 vue2登录调用后端接口如何实现