Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

reentrant(3)

perror(3C)

perror(3C)



strerror(3C)                      SDK R4.11                     strerror(3C)


NAME
       strerror - get error message string

SYNOPSIS
       #include <string.h>

       char *strerror (int errnum);

DESCRIPTION
       strerror maps the error number in errnum to an error message string,
       and returns a pointer to that string.  strerror uses the same set of
       error messages as perror.  The returned string should not be
       overwritten.


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

SEE ALSO
       reentrant(3), perror(3C).

EXAMPLE
       The following program prints an error message corresponding to the
       generic UNIX I/O message.

       /* Program test for the strerror() function */

       #include <errno.h>
       #include <stdio.h>

       char *strerror();

       main() {
           printf("Error message is: %s\n", strerror(EIO));
           return 0;
       }

       A call to this program generates the output

       Error message is: Error EIO(5) -- Error in input/ouput.

FILES
       /usr/lib/locale/locale/LCMESSAGES/uxsyserr -- message catalog.

SEE ALSO
       perror(3C).


Licensed material--property of copyright holder(s)

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