Ma, Steve wrote:
>
>> -----Original Message-----
>> From: Vasu Dev [mailto:[email protected]]
>> Sent: Wednesday, February 25, 2009 10:45 AM
>> To: Ma, Steve
>> Cc: [email protected]
>> Subject: Re: [Open-FCoE] [PATCH 1/3] fcoemon: Ensure fcoemon terminates
>> after 'service fcoe stop'
>>
>> Steve Ma wrote:
>>> 'pidof /sbin/fcoemon' shows the pid of the currently running fcoemon.
>>> It does not show all the running fcoemon. This patch is to issue
>>> 'pidof fcoemon' to show all the pids of the fcoemon and kill each
>>> one of them in the beginning of service_stop() routine of the startup
>>> script.
>>>
>>>
>> Shouldn't we have only one fcoemon running at any time for all fcoe
>> instances of eth ? If more than one fcoemon is running then something
>> is wrong in starting and stopping fcoemon leading to multiple fcoemon
>> instances and this patch would mask that issue by killing all running
>> fcoemon on stop.
> I have seen more than one fcoemon running at the same time. That should be a
> bug in the startup script.
>>> Signed-off-by: Steve Ma <[email protected]>
>>> ---
>>>
>>> usr/etc/initd/initd.fedora | 6 ++++--
>>> 1 files changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/usr/etc/initd/initd.fedora b/usr/etc/initd/initd.fedora
>>> index 3071a2d..c2768cd 100755
>>> --- a/usr/etc/initd/initd.fedora
>>> +++ b/usr/etc/initd/initd.fedora
>>> @@ -188,8 +188,10 @@ service_start()
>>>
>>> service_stop()
>>> {
>>> - pidof $FCOEMON
>>> - [ $? -eq 0 ] && kill -TERM `pidof $FCOEMON`
>>> + for pid in `pidof fcoemon`
>>> + do
>>> + kill -TERM $pid
>>> + done
Doesn't this for loop implement killall? It seems to be
the same as 'killall -TERM $FCOEMON'
Joe
>>>
>>> for ifcfg_file in `ls $CONFIG_DIR/cfg-eth*`
>>> do
>>>
>>> _______________________________________________
>>> devel mailing list
>>> [email protected]
>>> http://www.open-fcoe.org/mailman/listinfo/devel
>>>
>>>
>
> _______________________________________________
> devel mailing list
> [email protected]
> http://www.open-fcoe.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel