OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael van Elst Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 23-Jul-2003 11:24:20 Branch: HEAD Handle: 2003072310242000 Modified files: openpkg-src/sendmail rc.sendmail Log: sendmail doesn't remove its pidfiles, fix wait function Summary: Revision Changes Path 1.20 +9 -7 openpkg-src/sendmail/rc.sendmail ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/sendmail/rc.sendmail ============================================================================ $ cvs diff -u -r1.19 -r1.20 rc.sendmail --- openpkg-src/sendmail/rc.sendmail 23 Jul 2003 08:33:29 -0000 1.19 +++ openpkg-src/sendmail/rc.sendmail 23 Jul 2003 09:24:20 -0000 1.20 @@ -12,6 +12,7 @@ sendmail_flags_out="-q60s" sendmail_flags_msp="-Ac -q60s" sendmail_flags="" + sendmail_wait_timeout="60" sendmail_log_prolog="true" sendmail_log_epilog="true" sendmail_log_numfiles="10" @@ -32,23 +33,24 @@ -OPidFile=$sendmail_pidfile_msp fi } + sendmail_signal1 () { + [ -f $2 ] && kill -$1 `cat $2` + } sendmail_signal () { local rc - [ -f $sendmail_pidfile_in ] \ - && kill -$1 `cat $sendmail_pidfile_in` + sendmail_signal1 $1 $sendmail_pidfile_in rc=$? - [ -f $sendmail_pidfile_out ] \ - && kill -$1 `cat $sendmail_pidfile_out` \ + sendmail_signal1 $1 $sendmail_pidfile_out \ && [ $rc -eq 0 ] rc=$? - [ -f $sendmail_pidfile_msp ] \ - && kill -$1 `cat $sendmail_pidfile_msp` \ + sendmail_signal1 $1 $sendmail_pidfile_msp \ && [ $rc -eq 0 ] } sendmail_wait1 () { local i=0 - while [ $i -lt $sendmail_wait_timeout -a -f $1 ]; do + while [ $i -lt $sendmail_wait_timeout -a sendmail_signal1 0 $1 ]; do sleep 1 + i=`expr $i + 1` done rm -f $1 2>/dev/null || true } @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]