Hi

Everybody knows a UNIX child process inherits some info from its parent :
open file (socket too:-) , session, terminal, some signal setup,
current working dir,  ....
But normally daemon process should close all opened files and take care of
all these stuff.
Any way about all openpkg service I have installed don't do that

I made a short test

It looks native redhat/fedora mysql services also keep fd open, but
other are fine

--------- snip ----------
#!/bin/bash

touch /tmp/kolab.bug
exec 45<> /tmp/kolab.bug

openpkg rc all stop start

sleep 10

echo Now look for open files in kolabs daemons then press ENTER
ps -p 
read

exec 45>&-
--------- snip ----------

Here is the output

OpenPKG: stop: spamassassin, amavisd, apache, clamav, egadmin, egmon, egsmtpdup
OpenPKG: stop: imapd, postfix, postfix_front, proftpd, kolabd, mysql, sasl
OpenPKG: stop: openldap, bind.
OpenPKG: start: openpkg, bind, openldap, mysql, sasl, spamassassin, amavisd
OpenPKG: start: apache, clamav, egadmin, egmon, egsmtpdup, imapd, postfix
OpenPKG: start: postfix_front, proftpd, kolabd.
Now look for open files in kolabs daemons then press ENTER
  PID TTY      STAT   TIME COMMAND
18818 pts/0    S+     0:00 sh ./kb2.sh
21137 ?        Ss     0:00 /kolab/sbin/named -u kolab-r
21207 ?        Ssl    0:00 /kolab/libexec/openldap/slapd -h ldap:// ldaps://
21211 ?        Ssl    0:00 /kolab/libexec/openldap/slurpd
21355 ?        S      0:00 /bin/sh /kolab/bin/mysqld_safe --mysqld=mysqld --pid-
21439 ?        Sl     0:00 /kolab/libexec/mysql/mysqld --basedir=/kolab --datadi
21612 ?        Ss     0:00 /kolab/sbin/saslauthd -a ldap -n 2
21632 ?        S      0:00 /kolab/sbin/saslauthd -a ldap -n 2
22000 ?        Ss     0:01 /kolab/bin/spamd --daemonize --pidfile=/kolab/var/spa
22110 ?        S      0:00 spamd child
22111 ?        S      0:00 spamd child
22112 ?        Ss     0:00 amavisd (master)
22223 ?        Ss     0:00 /kolab/sbin/apache
22258 ?        S      0:00 amavisd (virgin child)
22259 ?        S      0:00 amavisd (virgin child)
22335 ?        S      0:00 /kolab/sbin/apache
22336 ?        S      0:00 /kolab/sbin/apache
22337 ?        S      0:00 /kolab/sbin/apache
22338 ?        S      0:00 /kolab/sbin/apache
22339 ?        S      0:00 /kolab/sbin/apache
22340 ?        Ss     0:00 /kolab/sbin/clamd --config-file=/kolab/etc/clamav/cla
22683 pts/0    S+     0:00 /kolab/bin/cyrmaster
22763 pts/0    S+     0:00 notifyd

All these service keep FD open !
cyrus master keep also the parent terminal !
Then CTRL-C of the script kill my cyrus server ! Hopefully this
disapered in last openpkg's cyrus package.

It looks my native redhat/centos/fedora service don't suffer this
problem (except mysql).

I'm writing a web application, that sometime restart openpkg service,
and I was very surprised to see my imap down unexpectedly or not
able to restart my app because port 8080 was already in use !
I "daemonized" my call to openpkg service and my app is working fine.

Is it a bug, a feature or something normal ?

Regards


-- 
--
Alain Spineux
aspineux gmail com
May the sources be with you
______________________________________________________________________
OpenPKG                                             http://openpkg.org
User Communication List                      openpkg-users@openpkg.org

Reply via email to