Hi Matthew,

It's not unusual to want to run multiple nntpsends out of cron (to
feed different sites at different frequencies, for example). However,
nntpsend uses one global lock file, and silent exits if unable to get
that lock. I suggest it instead uses a per-site lock (particularly if
a site is specified on the command-line).

It already does that.
When parsing either the command-line or the nntpsend.ctl file,
a lock is searched for the site name.

   ## NOTE: This lock is not nntpsend's lock but rather the
   ##       lock that the parent shell of innxmit will use.
   ##       Later on the child will take the lock from us.
   ##
   LOCK="${LOCKS}/LOCK.${SITE}"
   shlock -p $$ -f "${LOCK}" || continue


Did you try to run nntpsend with the -n flag?  I believe it should
give you exactly what you try to achieve.
The lock for nntpsend is different than the lock for each site when
nntpsend runs.


Emitting an error if unable
to get the lock would be better than silently failing, too.

Index: backends/nntpsend.in
===================================================================
--- backends/nntpsend.in        (révision 9063)
+++ backends/nntpsend.in        (copie de travail)
@@ -149,6 +149,7 @@
if [ -z "${NOLOCK}" ]; then
    shlock -p $$ -f ${NNTPLOCK} || {
        # Nothing to do.
+        echo "${PROGNAME}:  Lock found" 1>&2
        exit 0
    }
fi


--
Julien ÉLIE

« Life is short -- so eat dessert first! »



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to