develooper Front page | perl.perl5.porters | Postings from February 2004

Re: [perl #15063] /tmp issues

Thread Previous | Thread Next
Dave Mitchell
February 1, 2004 07:42
Re: [perl #15063] /tmp issues
Message ID:
On Mon, Jan 26, 2004 at 01:22:18AM +0300, Solar Designer wrote:
> Hi,
> Well, our package has been updated to Perl 5.8.3, and attached to this
> message you can find the new temporary file handling patch.

Thanks, applied to bleedperl as change #22255, except for the following:

Many systems don't have a /var/run directory, or it is only writeable by root;
so in the following files I didn't change the examples from '/tmp/foo'
to '/var/run/foo'; instead I changed them to just 'foo' or '/some/path/foo'
as appropriate:


    changed "/nonexistent" to "/non/exist/ent" -less likelyhood of the
    file actually being created, eg by a bug in the script

    I didn't apply this!

    +# XXX: The temporary file handling implemented in here is crap.  It should
    +# be re-done making use of File::Temp.

    didn't apply this:

     # If more accuracy is wanted/needed, Chris Leach sent me this patch...
      # > *** /install/perl/live/lib/	Wed Sep 24 13:08:48 1997
    - # > --- /tmp/cp	Wed Sep 24 13:26:40 1997
    + # > --- cp	Wed Sep 24 13:26:40 1997

    it no longer uses the tmp file it creates, so I just removed the
	$tmp = "/tmp/inst.$$"
    line instead.

    rather than changing the tty file from /tmp/perldbtty$$ to
    /var/run/perldbtty$$, I changed it to .perldbtty$$
    Note that this is a user-visible change.


    This is designed to run on old 5.005 syststems, and as such it can't
    rely on File::Temp, so I didn't apply this one.

Please note that ash-trays are provided for the use of smokers,
whereas the floor is provided for the use of all patrons.
    -- Bill Royston

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About