NetBSD-Bugs archive

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

Re: bin/56775: sort -o foo foo can sometines remove foo



The following reply was made to PR bin/56775; it has been noted by GNATS.

From: Thomas Klausner <wiz%NetBSD.org@localhost>
To: NetBSD bugtracking <gnats-bugs%NetBSD.org@localhost>
Cc: 
Subject: Re: bin/56775: sort -o foo foo can sometines remove foo
Date: Thu, 31 Mar 2022 23:49:16 +0200

 On Thu, Mar 31, 2022 at 09:35:01PM +0000, RVP wrote:
 > The following reply was made to PR bin/56775; it has been noted by GNATS.
 > 
 > From: RVP <rvp%SDF.ORG@localhost>
 > To: gnats-bugs%netbsd.org@localhost
 > Cc: 
 > Subject: Re: bin/56775: sort -o foo foo can sometines remove foo
 > Date: Thu, 31 Mar 2022 21:31:11 +0000 (UTC)
 > 
 >  On Thu, 31 Mar 2022, Thomas Klausner wrote:
 >  
 >  > Shouldn't the there be an
 >  >
 >  > 	  unlink(outfile);
 >  >
 >  > in the error case?
 >  >
 >  
 >  rename(2) will do that.
 
 If the rename fails, it won't. That's why I wrote "in the error case".
  Thomas
 


Home | Main Index | Thread Index | Old Index