﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
310	lfs-bootscripts-1.8	gerard@…	gerard@…	"getpids function doesn't take ""grandfather pid"" into account:

From: Dirk Groeneveld <dirk.groeneveld@gmx.de>                                  
To: lfs-dev <lfs-dev@linuxfromscratch.org>                                      
Subject: bootscripts bug                                                        
Date: Thu, 14 Mar 2002 00:35:04 +0100                                           

I have found a problem with the bootscripts, and tinkered with them a           
little, but found no satisfying solution so far. I have tried version           
1.7. It's all very weird and I am very confused.                                
                                                                                
Apparently the script finds itself when it is called like the daemon it         
is meant to start. For example, I use /etc/rc.d/init.d/squid to start           
/usr/sbin/squid. The script starts up, looks for squid, finds itself,           
thinks, squid is already running, and aborts. That is very weird because        
I'd think that the -o %PPID parameter to pidof (in getpids() in                 
/etc/rc.d/init.d/functions) would filter out the script from the list of        
returned pids. So I added a ""ps ax | grep squid"" right after the pidof          
command, and had it print the return of getpids to the screen. It looks         
like this (newlines deliberately added to improve readability, he prints        
everything into one line):                                                      
                                                                                
Starting squid ...                                                              
1747 pts/2 S 0:00 /bin/sh ./squid start                                         
1750 pts/2 S 0:00 /bin/sh ./squid start                                         
1754 pts/2 S 0:00 grep squid                                                    
1751                                                                            
1750                                                                            
Already running     [ ATTN ]"	defect	closed	normal		Book	CVS	normal	fixed		
