clvmd should create its own pid file
PATCH 1/1 clvmd should create its own pid file
Hi guys,
as discussed on IRC, clvmd needs to create its own pid file.
Code stolen from cmirrord :)
Fabio
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clvmd_pid_file.diff
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100708/9dfc1bd2/attachment.ksh>
PATCH 1/1 clvmd should create its own pid file
Does this work OK with clvmd -S?
Should we have FD_CLOEXEC ?
(See pidfile.c in multipathd.)
Also, let's make it library code rather than copying it from cmirrord.
Alasdair
PATCH 1/1 clvmd should create its own pid file
Quoted 1 line · Alasdair G Kergon
Does this work OK with clvmd -S?
Yes. It appears to be working fine.
Quoted 3 lines
Should we have
FD_CLOEXEC?(See
pidfile.cin multipathd.)
I don't have any special preference. I noticed that the pid file implementations in other daemons (within lvm2) don't use it nor unlink the pid file on exit.
Quoted 1 line
Also, let's make it library code rather than copying it from cmirrord.
Works for me.
I am going to make it a lib call and cleanup both cmirrord/dmeventd/clvmd.
Do you have anything against atexit() handler? That's what we use in cluster daemons to unlink the pid files.
Cheers
Fabio
PATCH 1/1 clvmd should create its own pid file
Quoted 2 lines · Fabio M. Di Nitto
Do you have anything against
atexit()handler? That's what we use in cluster daemons to unlink the pid files.
I can't think of any problems with that in the daemon context.
Alasdair