Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ error(M) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 error(M)                      06 January 1993                       error(M)


 Name

    error - kernel error output device

 Description

    System error messages are collected and made available to error logging
    daemons through the /dev/error device.  /dev/error is a read-only device
    which returns one error per read and no EOF character.  The
    /etc/rc.d/1/sdaemons script uses the utility /etc/logger to read messages
    from /dev/error and write them to the system error log file
    /usr/adm/messages:

       /etc/logger  /dev/error  /usr/adm/messages  &

    Any process can read /dev/error or arrange to be signaled when errors are
    queued in /dev/error.  The following ioctl causes the error device to
    signal the process with SIGUSR1 when an error message is queued in
    /dev/error.

       #include <signal.h>
       #include <sys/eio.h>
       #include <fcntl.h>
       ...
       int fd;
       ...
       fd = open("/dev/error", O_RDONLY);
       ioctl(fd, EMSG_SIG, SIGUSR1);

    Before exiting, the process must return /dev/error to its normal state.
    Do this with the following ioctl:

       ...
       ioctl(fd,EMSG_NOSIG, 0);
       ...

    Panic error messages are not logged in /dev/error.

 Files

    /dev/error

 Value added

    error is an extension of AT&T System V provided by The Santa Cruz Opera-
    tion, Inc.


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