LFS Bootscripts

DJ Lucas dj at linuxfromscratch.org
Mon Aug 8 06:56:28 PDT 2005

Alexander E. Patrakov wrote:
> DJ Lucas wrote:
>> Never mind.  $$ is not actually incrementing, but I don't know what
>> processes pidof is finding when running that script.  Creating a second
>> functions script with only statusproc and getpids using the same 'pidof
>> -o $$ -o $PPID -x "${1}"' gives the proper result.  It looks as if pidof
>> it's finding it's own PID but that can't be either because it does not
>> find itself in the second example.  I'm at a loss.  Will revisit after
>> some sleep.
> Is that because of "stty sane" at the bottom of the "functions" file?

Unfortunately, no.  If you rewrite getpids in the old style (without 
using pidofproc), it works as expected.  BTW, the first test in getpids 
should be -n instead of -z.  I believe it appears to work as is because 
of the logic in pidofproc, but I can't look right this second.

-- DJ Lucas

More information about the lfs-dev mailing list