NetBSD-Bugs archive

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

Re: bin/44973



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

From: Nat Sloss <nathanialsloss%yahoo.com.au@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/44973
Date: Sun, 27 Nov 2011 02:19:45 +1100

 Hi,
 
 I have a solution to the problem.
 
 Is seems errno is set to zero by fts_read when it returns null ie after all 
 entries have been read.  So I believe that errno should be set to zero upon 
 exiting as all entries have been read or rather discarded.
 
 So here is my patch:
 
 --- find.c.orig 2011-11-27 01:54:23.000000000 +1100
 +++ find.c      2011-07-02 11:07:27.000000000 +1000
 @@ -229,6 +229,7 @@
                         if (p->type == N_EXIT) {
                                 rval = p->exit_val;
                                 cval = 0;
 +                               errno = 0;
                         }
         }
 
 It works for me hopefully it will help others.
 
 Regards,
 
 Nat.
 


Home | Main Index | Thread Index | Old Index