Skip to contentSkip to conversation

clvmd should create its own pid file

PATCH New Fabio M. Di Nitto 2 participants 4 messages Jul 8, 2010

lore
Share & tools
lore
#1 lore raw

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

#2 lore raw

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.c in 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

#3 lore raw

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