This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: event logging -- cron


On Tue, 8 April 2003, David Byron wrote:

> On Tue, 8 April 2003, Igor Pechtchanski wrote:
> 
> > <http://cygwin.com/ml/cygwin/2003-03/msg01087.html> might help
> > clear things up.
> 
> It does.  Thank you.  I may get to a patch for that, but 
> there's still the strange return code from cron_pclose() that 
> generates the
> 
> /usr/sbin/cron : PID 3132 : (DByron) MAIL (mailed 20 bytes of 
> output but got status 0xffffffff ).
> 
> part of the event.
> 
> Any ideas?  I'll let you know if I figure it out.

I made this log entry disappear, but it's safe to say I don't have a full
understanding of the issues involved.  All the source I'm about to reference
is from cron-3.0.1-7.  I hope this is the right place to get into this.

do_command.c (v 1.3) starting at line 117 is

#ifdef USE_SIGCHLD
	/* our parent is watching for our death by catching SIGCHLD.  we
	 * do not care to watch for our children's deaths this way -- we
	 * use wait() explictly.  so we have to disable the signal (which
	 * was inherited from the parent).
	 */
	(void) signal(SIGCHLD, SIG_IGN);
#else
	/* on system-V systems, we are ignoring SIGCHLD.  we have to stop
	 * ignoring it now or the wait() in cron_pclose() won't work.
	 * because of this, we have to wait() for our children here, as
well.
	 */
	(void) signal(SIGCHLD, SIG_DFL);
#endif /*BSD*/

For me, when USE_SIGCHLD is defined, I get the error.  When I change this
conditional to #if 0, the error goes away.

USE_SIGCHILD is defined in compat.h (v 1.4, lines 116-118) like this:

#if !defined(ATT) && !defined(__linux) && !defined(IRIX) && !defined(UNICOS)
# define USE_SIGCHLD
#endif

When I force USE_SIGCHLD to be undefined in compat.h, the error is still
gone, and things seem to be working fine.  I do have cron only doing
something very simple.  /etc/cron.d contains a file named testcron which
contains:

* * * * * dbyron echo "testcron says hello"

Does anyone know what the proper patch is to keep USE_SIGCHLD from getting
defined?  Is that an OK thing to do?

If it's important, I'm not running cron as a service.  I mucked around with
my permissions enough that I can just start cron on the command line.  I can
resend the output of cygcheck if necessary.

Thanks much.

-DB

PS Thanks for those contributing to the message resource stuff that I posted
about.  I'll check it out once I get through this.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]