sean@dmr.asa.com (Sean Baker) (05/17/91)
Can someone tell me a standard way for a C program to send error messages to the console (e.g. in the event of a crash, etc.). Thanks, Sean ======================================= Sean Baker <sean@dmr.asa.com> Data Management Resources 20725 South Western Avenue, Suite 100 Torrance, CA 90501 USA (213)618-9677
gautier@charly.taclog.af.mil (Sgt Richard Gautier) (05/17/91)
For standard error messages of the OOOPS, I messed up variety, I would depend on just writing the output to stderr with a fprintf(stderr,"OOPS"); However, if you must write to the console, you can open /dev/console on most Unix boxes, and fprintf your info to that. On some Unix boxes, there is an errorlog that is constantly checked and sent to the console (used for DISK crashes, etc.) Do a ps and see if you have any cat -u processes running for console. Rich Gautier gautier@taclg.af.mil
weimer@garden.ssd.kodak.com (Gary Weimer (253-7796)) (05/18/91)
In article <26918@adm.brl.mil>, gautier@charly.taclog.af.mil (Sgt Richard Gautier) writes: |> For standard error messages of the OOOPS, I messed up |> variety, I would depend on just writing the output to |> stderr with a fprintf(stderr,"OOPS"); |> |> However, if you must write to the console, you can |> open /dev/console on most Unix boxes, and fprintf your |> info to that. On some Unix boxes, there is an errorlog |> that is constantly checked and sent to the console (used |> for DISK crashes, etc.) Do a ps and see if you have any |> cat -u processes running for console. Isn't syslog(3) the "standard" way? I don't have access to many Unix varieties, so I don't know...