need bash script to always run under new process group
Is there a way to have a bash script know it should always run with a unique pgid? Put another way, I want the bash script to set within itself a new pgid, and pass the 'new' pgid to all it's children.
Now, sure, I could could just write a wrapper script; Code:
cat /bin/myscript.newpgid From the manpages, I would have thought "#!/bin/bash -m" would have done this, but in my testing it did not (RedHat 6.4). Plus, running a non-interactive script with "-m" is just gross.... -- Peace. |
Quote:
Code:
if [ "$WRAPPER_SCRIPT_NAME" != "something_or_other" ]; then |
Hm, that would work in our environment, but this script is used other places where it's re-named. The script even sets "local PROGNAME=$0", and then uses that in functions (as in, exclude the script from ps output).
It would be really cool if this worked; Code:
#!/bin/bash |
All times are GMT -5. The time now is 10:10 AM. |