NetBSD-Bugs archive

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

Re: lib/44959: Missing closedir in glob.c



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

From: christos%zoulas.com@localhost (Christos Zoulas)
To: Martin Husemann <martin%duskware.de@localhost>, 
gnats-bugs%NetBSD.org@localhost
Cc: henning.petersen%t-online.de@localhost
Subject: Re: lib/44959: Missing closedir in glob.c
Date: Sat, 14 May 2011 18:47:52 -0400

 On May 14, 11:31pm, martin%duskware.de@localhost (Martin Husemann) wrote:
 -- Subject: Re: lib/44959: Missing closedir in glob.c
 
 | I think it is, but I do not understand the comment below the loop:
 | 
 |  * Again Posix X/Open issue with regards to error handling.
 | 
 | and maybe we should return "error" in this case, like:
 | 
 |         if ((error || errno) && (pglob->gl_flags & GLOB_ERR))
 |                 return error ? error : GLOB_ABORTED;
 | 
 | 
 | Christos, could you review? Or anyone?
 
 This goes back the the discussion on when to return an error when opendir
 fails. I vote to leave it alone. One can control what happens with GLOB_ERR.
 I fixed the closedir issue as suggested.
 
 christos
 


Home | Main Index | Thread Index | Old Index