getcwd() problem

Yasushi Higuchi yzone@mail.raidway.ne.jp
Fri Oct 5 07:34:00 GMT 2001


On Fri, 5 Oct 2001 16:23:52 +0400
egor duda <deo@logos-m.ru> wrote:

>Single Unix Specification v2 says that "If buf is a null pointer, the
>behaviour of getcwd() is undefined."

>cygwin doesn't support this extension. it's arguable whether it should
>be added or not. code that implicitly allocates (on doesn't allocate,
>depending in parameters) memory on heap is a source of potential
>memory leaks.

Yes. It is understood.
But, as for the program written like

>>>    char *cwd = getcwd(NULL, 256);

as ISO C, a problem occurs in snapshot.

Is this the thing of the problem which should cope with it on the
application side?

-- 
Yasushi HIGUCHI


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list