Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ error(M) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

messages(M)

ERROR(M)


     ERROR(M)                                   UNIX System V



     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/rc2 scripts use a
          utility 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


     See Also
          messages(M)


     (printed 8/23/89)                                  ERROR(M)

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