Project

General

Profile

Actions

Bug #9752

closed

r45598 causes Errno::EINVAL on Solaris

Added by ngoto (Naohisa Goto) about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-04-17) [sparc64-solaris2.10]
[ruby-core:62072]

Description

On Solaris, after r45598, the following error occurs.

./miniruby: Invalid argument - getcwd (Errno::EINVAL)

It seems that getcwd(NULL, 0) is not supported in Solaris.
The Solaris man page of getcwd(3c) says:

     If buf is a null pointer, getcwd()  obtains  size  bytes  of
     space using malloc(3C). The pointer returned by getcwd() can
     be used as the argument in a subsequent call to free().

But no description when the size is zero.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0