Re: pgid of spawned processes

2016-11-06 Thread Rakesh Sharma
unday, November 6, 2016 2:27 PM To: Rakesh Sharma Cc: help-make@gnu.org Subject: Re: pgid of spawned processes 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 yo

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
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"