[comp.unix.ultrix] Ultrix4/Risc/Crond stangeness

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" -------------------------

cliffb@isavax.isa.com (cliff bedore*) (10/18/90)

In article <1990Oct16.102232.1144@squirrel.mh.nl> Johan Vromans <jv@mh.nl> writes:
>[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
.
.
.
>
>Puzzling, isn't it...
>
>	Johan
>-- 

I have had a similar experience with csh programming (Ultrix 3.0).  I have the
identical program running on 2 microvaxes (1 BA23 1 BA123) that are supposed
to do a logout of idle users.  When run from cron, the one on the BA123 (9MB
RAM) works fine,  the one on the BA23 (6 MB RAM. not sure if mem is
significant) will not work.  It stops partway through.  However if i run it
as root (su) it works fine and if I kill cron and restart it as root, it
works fine.  I posted this once before and got no real answers but this
problem sounds similar enough that I thought I'd mention it again.

Any Ideas

Cliff