Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!doc.ic.ac.uk!bright.ecs.soton.ac.uk!pessoa.ecs.soton.ac.uk!not-for-mail From: rsk@ecs.soton.ac.uk (Bob Kemp) Newsgroups: comp.os.386bsd.bugs Subject: Re: Problems with new execle() in NetBSD 0.9 Date: 11 Sep 1993 00:37:42 +0100 Organization: Electronics and Computer Science, University of Southampton Lines: 33 Message-ID: <26r346$qq2@pessoa.ecs.soton.ac.uk> References: <26l67i$6qs@hrd769.brooks.af.mil> <26o88r$heb@pessoa.ecs.soton.ac.uk> <26qsb1INN1e3@darkstar.UCSC.EDU> NNTP-Posting-Host: pessoa.ecs.soton.ac.uk In <26qsb1INN1e3@darkstar.UCSC.EDU> buhrow@cats.ucsc.edu (Brian Buhrow) writes: > Actually, I believe the bug is in the shell. If you change the >environment variable in the root crontab file to csh, or something else, it >works properly. Also, you can reproduce the same behavior from the root I don't get this behaviour. Changing to /bin/csh had no effect and if you read Dave Brugess's original posting it (indirectly) mentions trying bash as well as /bin/sh. All to no avail. I also tried /bin/csh but with no effect. > For some reason, sh -c <command of choice> for non-root types works >fine. But, as I say, the bug is probably in the sh command line parser. Following up on Dave Burgess's comment about stat, I looked at do_command.c. Near line 282 is a stat command. There are _2_ bugs o The fputs goes to stderr but stderr is line buffered (crond.c line 65) and perror doesn't seem to use buffering. Add fflush(stderr) after the fputs(...) o The call of stat uses cmd but should be sthg like stat(first_word(cmd, " \t"),&sb) instead. To be accurate the " \t" should really use $IFS. Bob -- Robert Kemp Internet: rsk@ecs.soton.ac.uk Phone: (0703) 59 31 22 ECS Dept, Southampton Univ, Highfield, Southampton, S09 5NH, UK "Rose bushes have thorns; thorn bushes bear roses"