jv@mh.nl (Johan Vromans) (10/16/90)
[Consider this a warning, since I don't know who/what to blame...] System: DECsystem5000, Ultrix 4.0, Perl 3.0 pl 28 (cc compiled w/o -O). A file system maintenance script mysteriously fails when run under Paul Vixie's cron daemon. It doesn't fail when run interactively, or from Ultrix cron. I haven't noticed failing it on other systems (VAX/Ultrix3.1/Crond and HP9000-320/HP-UX6.2), nor have I noticed other programs running from the cron daemon to fail. The program creates three output files: $where = "/var/tmp/"; $logfile = $where . "fscan.log"; $symfile = $where . "symlinks"; $dirfile = $where . "dirfile"; open (LOGFILE, ">$logfile") || die "Cannot create $logfile [$!]\n"; open (DIRFILE, ">$dirfile") || die "Cannot create $dirfile [$!]\n"; open (SYMFILE, ">$symfile") || die "Cannot create $symfile [$!]\n"; Although output is written to all three files, the first file remains empty on disk. However, when I exchange the first two open commands: open (DIRFILE, ">$dirfile") || die "Cannot create $dirfile [$!]\n"; open (LOGFILE, ">$logfile") || die "Cannot create $logfile [$!]\n"; open (SYMFILE, ">$symfile") || die "Cannot create $symfile [$!]\n"; all three files are written OK. The program has been rewritten substantially without affecting the failure, only the above exchange of open commands seems to be a work around. Puzzling, isn't it... Johan -- Johan Vromans jv@mh.nl via internet backbones Multihouse Automatisering bv uucp: ..!{uunet,hp4nl}!mh.nl!jv Doesburgweg 7, 2803 PL Gouda, The Netherlands phone/fax: +31 1820 62911/62500 ------------------------ "Arms are made for hugging" -------------------------