开发者

Run processes in separate environments in cygwin

SO I have a script that creates its own environment variables which ar开发者_如何学运维e then accessed by a c++ program.

I want to run multiple instances of this program, and while doing that I want to keep them running on different environments to avoid the separate processes accessing each others environment variables and getting mixed up.

At the moment what Im doing is open a new cygwin window and: . ./script.sh

But I have to open a new window each time.


Just run as many ./script.sh >outN 2>errN & in one window as you like (note: use different numbers N per invocation; do not source them with the dot). This way they cannot overwrite each others environment variables because each script is executed in a separate shell.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜