在网站上执行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.

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.