[Pkg-firebird-general] one more thing

Mark O'Donohue mark.odonohue@firebirdsql.org
Mon, 02 Aug 2004 13:24:13 +1000


Grzegorz B. Prokopski wrote:
> W li¶cie z pi±, 30-07-2004, godz. 05:47, Daniel Urban pisze: 
> 
>>Hi
>>Only one important issue (AFAIK) remains:
>> 
>>After uninstall classic server there is fb_lock_mgr running.
>>In standard firebird there is in preuninstall.sh is
>> 
>> 
>># Stop lock manager if it is the only thing running.
>> 
>>    for i in `ps -ef | egrep "[gds|fb]_lock_mgr" | cut -d' ' -f3`
>>     do
>>        kill $i
>>     done
>>
>> 
>>but it doesn't work. Maybe somebody knows how to
>>kill all running fb_lock_mgr without killall?
> 

My guess since it seem to run fb_lock_mgr with the full path.

ie:
 > ps -ef | grep lock
root         4     1  0 09:56 ?        00:00:00 [kblockd/0]
firebird  3014     1  0 13:19 ?        00:00:00 
/opt/firebird/bin/fb_lock_mgr
 >
(this is on my mandrake box)


Sometime the latter part of the file name can be trimmed by ps to fit 
the page format.

So ps -efww may be needed to pick it up:

`ps -efww | egrep "[gds|fb]_lock_mgr" | cut -d' ' -f3`


> 
> The above tries to be almost an equivalent of killall so I don't see
> a gain of using such complicated method of killing the process.
> 
> But why not do something like (not tested though):
> 
> for i in `ps -ef | grep ^firebird | awk '{ print $8 " " $3 }' \
>   | egrep '[gds|fb]_lock_mgr' | awk '{ print $2 }'; do ...
> 

At the time of developing the original the lock manager was running 
under any number of user names.

Cheers

Mark