Re: pgid of spawned processes

2016-11-06 Thread Rakesh Sharma
The environment is passed on to it's child processes by make, so if you can find a way to push the pid of your make run into one then you're done. a) Invoke make as follows: tmpf=`mktemp` TMPF="$tmpf" make -f yourmakefile yourtarget & pid=$! echo "$pid" > $tmpf wait "$pid" rm -f "$tmpf"

Re: pgid of spawned processes

2016-11-06 Thread Jonathan Leonard
Thanks for the nudge in the right direction but... ... an easier way to make that happen is to introduce an initial bash script: #!/bin/bash export ROOT_PID=$$ make -f yourmakefile yourtarget [This will set the bash script's PID into the env of all descendants (which is good enough for our purpo

Re: pgid of spawned processes

2016-11-06 Thread Rakesh Sharma
You may want to restrict the extent of the env to the make (+ it's children) rather than the whole bash script, with the following: ROOT_PID="$$"make -fyourmakefileyourtarget --Rakesh From: Jonathan Leonard Sent: Sunday, November 6