Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ realpath(3C) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

reetrant(3)

getcwd(3C)



realpath(3C)                   DG/UX R4.11MU05                  realpath(3C)


NAME
       realpath - returns the real file name

SYNOPSIS
       #include <stdlib.h>
       #include <sys/param.h>

       char *realpath (char * filename, char * resolvedname);

DESCRIPTION
       realpath resolves all links and references to ``.'' and ``..'' in
       filename and stores it in resolvedname.

       It can handle both relative and absolute path names.  For absolute
       path names and the relative names whose resolved name cannot be
       expressed relatively (e.g., ../../reldir), it returns the resolved
       absolute name.  For the other relative path names, it returns the
       resolved relative name.

       resolvedname must be big enough (MAXPATHLEN) to contain the fully
       resolved path name.


   Considerations for Threads Programming
                     +---------+-----------------------------+
                     |         |                      async- |
                     |function | reentrant   cancel   cancel |
                     |         |             point     safe  |
                     +---------+-----------------------------+
                     |realpath |     Y         Y        N    |
                     +---------+-----------------------------+

SEE ALSO
       reetrant(3), getcwd(3C).

DIAGNOSTICS
       If there is no error, realpath returns a pointer to the
       resolvedname.  Otherwise it returns a null pointer and places the
       name of the offending file in resolvedname.  The global variable
       errno is set to indicate the error.

NOTES
       realpath operates on null-terminated strings.

       One should have execute permission on all the directories in the
       given and the resolved path.

       realpath may fail to return to the current directory if an error
       occurs.


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026