reformatting controlchan

Michael Stassen stassenm at indiana.edu
Thu Jan 25 17:00:27 UTC 2001



On Thu, 25 Jan 2001, Olaf Titz wrote:

> > >                         open(TEMPFILE, $tempfile) or die;
> > >                         open(NEWSGROUPS, ">$inn::newsgroups") or die;
>                                               ^
> > >                         print NEWSGROUPS $_ while <TEMPFILE>;
> > >                         close TEMPFILE;
> > >                         close NEWSGROUPS;
> > >   (it does not change the permissions of newsgroups, but is this a side
> > >    effect or a feature to be preserved?)
> >
> > It really should shlock newsgroups and then append to it, shouldn't it?
> 
> The above code is just a copy, why isn't that done with rename?
> 
> Olaf

Perl's rename won't work across file system boundaries.  Assuming
tempfile is in PATHTMP, rename will only work if PATHTMP and PATHDB are on
the same partition (newsgroups is in PATHDB).

Michael Stassen
Support Center
University Information Technology Services
Indiana University Bloomington
stassenm at indiana.edu





More information about the inn-workers mailing list