From owner-freebsd-current Sat Jul 1 14:13: 4 2000 Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 542) id 8853D37B951; Sat, 1 Jul 2000 14:13:02 -0700 (PDT) Date: Sat, 1 Jul 2000 14:13:02 -0700 From: "Andrey A. Chernov" To: Mark Murray Cc: current@freebsd.org Subject: Re: perl, cron or sh bug Message-ID: <20000701141302.A34043@freebsd.org> References: <20000701204443.A43672@nagual.pp.ru> <200007011700.TAA17595@grimreaper.grondar.za> <20000701134907.A29454@freebsd.org> <20000701140301.A32165@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <20000701140301.A32165@freebsd.org>; from ache@freebsd.org on Sat, Jul 01, 2000 at 02:03:01PM -0700 Organization: Biomechanoid Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Jul 01, 2000 at 02:03:01PM -0700, Andrey A. Chernov wrote: > On Sat, Jul 01, 2000 at 01:49:07PM -0700, Andrey A. Chernov wrote: > > On Sat, Jul 01, 2000 at 07:00:07PM +0200, Mark Murray wrote: > > > I've got this and some other tweaks commit-ready; I'll do them tomorrow... > > > > When running as cron job, from shell script, perl now always say this: > > "Can't ignore signal CHLD, forcing to default" (see perl.c) > > > > I am not shure, is this cron bug calling with ignoring SIGCHLD, sh bug, or > > perl bug. I think cron shouldn't call anything with SIGCHLD ignored. > > Yes, it was in cron/do_command.c > (void) signal(SIGCHLD, SIG_IGN); > > What about re-allowing SIGCHLD after second fork (i.e.vfork), just before > execle()? Any objections? OpenBSD already have simpler fix in rev 1.7 (below). I'll think which way is better... --------- Set SIGCHLD to SIG_DFL not SIG_IGN to prevent "perl -w" from complaining "Can't ignore signal CHLD, forcing to default". Setting SIGCHLD to SIG_IGN means "don't provide exit status for my children" on some OSes which is not what we want--we just don't want to catch SIGCHLD since our parent does that for us. --------- -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message