[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Sheflug] Weird happenings with PERL script and cron



>>>>> "David" == David Morris <david [at] allvac.co.uk> writes:

    David> I've thanked David personally, but for the record, he was
    David> correct and a one-liner solved the problem.

Great!

I prefer snakes to shellfish, so this is not exactly my area of
expertise, but I noticed another possible problem.  If for some reason
the rcp of the qmail file failed (and qmail is notorious for funky
permissions), you could end up with an empty file in /tmp.  In that
case, the following open would succeed but there would be nothing
there.

I _think_ that the semantics of an ordinary cp (which is basically how
rcp is implemented) on a hard drive do not permit this, but I have
recently been bitten by exactly this phenomenon on the Coda network
file system (where it is possible to create a file you do not have
permission to write to!)

Even if this can't happen, it would be appropriately paranoid to check
the return values on all the system calls.

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.