From: usa@... Date: 2014-07-02T07:10:57+00:00 Subject: [ruby-core:63496] [ruby-trunk - Bug #9752] r45598 causes Errno::EINVAL on Solaris Issue #9752 has been updated by Usaku NAKAMURA. Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED ---------------------------------------- Bug #9752: r45598 causes Errno::EINVAL on Solaris https://bugs.ruby-lang.org/issues/9752#change-47539 * Author: Naohisa Goto * Status: Closed * Priority: Normal * Assignee: Nobuyoshi Nakada * Category: * Target version: * ruby -v: ruby 2.2.0dev (2014-04-17) [sparc64-solaris2.10] * Backport: 2.0.0: DONTNEED, 2.1: DONTNEED ---------------------------------------- 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. -- https://bugs.ruby-lang.org/