[OpenIndiana-discuss] realpath(3C)

Alan Coopersmith alan.coopersmith at oracle.com
Sat Jun 25 16:42:32 UTC 2011


On 06/25/11 04:33 AM, Frank Lahm wrote:
> Hi,
> 
> on latest Opensolaris snv134b realpath doesn't take NULL as second
> arg. On Solaris 11 Express it does, giving the semantics described in
> `man realpath`:
> 
> ...
> DESCRIPTION
>      The realpath() function derives, from the  pathname  pointed
>      to  by  file_name, an absolute pathname that resolves to the
>      same directory entry, whose resolution does not involve ".",
>      "..",  or  symbolic links. If resolved_name is not null, the
>      generated pathname is stored as a null-terminated string, up
>      to  a  maximum  of  {PATH_MAX}  (defined in limits.h(3HEAD))
>      bytes  in  the  buffer  pointed  to  by  resolved_name.   If
>      resolved_name is null, the generated pathname is stored as a
>      null-terminated string in a buffer that is allocated  as  if
>      malloc(3C) were called.
> ...
> 
> What's the case on Openindiana ?

illumos seems to have inherited the fix from the OpenSolaris sources
that S11X is using:

http://src.illumos.org/source/diff/illumos-gate/usr/src/lib/libc/port/gen/realpath.c?r2=%2Fillumos-gate%2Fusr%2Fsrc%2Flib%2Flibc%2Fport%2Fgen%2Frealpath.c%4013105%3A48f2dbca79a2&r1=%2Fillumos-gate%2Fusr%2Fsrc%2Flib%2Flibc%2Fport%2Fgen%2Frealpath.c%406812%3Afebeba71273d

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System




More information about the OpenIndiana-discuss mailing list