Re: Let a daemon process print a message
syslog() with the proper facility is probably the best way to do this. Another possibility is opening /dev/console, but I think that will aquire a controlling terminal. On Mon, 13 Sep 1999, Zhihui Zhang wrote: Can anyone tell me how to let a daemon process print a message to the console? Adding printf() does not work (I wonder if a daemon process has been cut of relationship with stdout). Thanks for any help. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Let a daemon process print a message
Out of da blue Zhihui Zhang aka ([EMAIL PROTECTED]) said: On Mon, 13 Sep 1999, Brian Mitchell (ISSATL) wrote: syslog() with the proper facility is probably the best way to do this. Another possibility is opening /dev/console, but I think that will aquire a controlling terminal. On Mon, 13 Sep 1999, Zhihui Zhang wrote: Can anyone tell me how to let a daemon process print a message to the console? Adding printf() does not work (I wonder if a daemon process has been cut of relationship with stdout). Thanks for any help. I have tested syslog(). I find out: (1) The log messages will go into /var/log/messages and appear on the console only after I login in (as root). (2) The LOG_INFO priority does not cause the messages to appear on the console or to be written into file /var/log/messages. Can anyone explain the reason for me? Thanks a lot. Did you add an entry in /etc/syslog.conf for your daemon? If not check the man page for syslog.conf(5) for details ... -Zhihui #:^) -- So ya want ta here da roots? Dem that feels it knows it ... bush doctor [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Let a daemon process print a message
Can anyone tell me how to let a daemon process print a message to the console? Adding printf() does not work (I wonder if a daemon process has been cut of relationship with stdout). Thanks for any help. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: Let a daemon process print a message
syslog() with the proper facility is probably the best way to do this. Another possibility is opening /dev/console, but I think that will aquire a controlling terminal. On Mon, 13 Sep 1999, Zhihui Zhang wrote: Can anyone tell me how to let a daemon process print a message to the console? Adding printf() does not work (I wonder if a daemon process has been cut of relationship with stdout). Thanks for any help. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: Let a daemon process print a message
On Mon, 13 Sep 1999, Brian Mitchell (ISSATL) wrote: syslog() with the proper facility is probably the best way to do this. Another possibility is opening /dev/console, but I think that will aquire a controlling terminal. On Mon, 13 Sep 1999, Zhihui Zhang wrote: Can anyone tell me how to let a daemon process print a message to the console? Adding printf() does not work (I wonder if a daemon process has been cut of relationship with stdout). Thanks for any help. I have tested syslog(). I find out: (1) The log messages will go into /var/log/messages and appear on the console only after I login in (as root). (2) The LOG_INFO priority does not cause the messages to appear on the console or to be written into file /var/log/messages. Can anyone explain the reason for me? Thanks a lot. -Zhihui To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message
Re: Let a daemon process print a message
Out of da blue Zhihui Zhang aka (zzh...@cs.binghamton.edu) said: On Mon, 13 Sep 1999, Brian Mitchell (ISSATL) wrote: syslog() with the proper facility is probably the best way to do this. Another possibility is opening /dev/console, but I think that will aquire a controlling terminal. On Mon, 13 Sep 1999, Zhihui Zhang wrote: Can anyone tell me how to let a daemon process print a message to the console? Adding printf() does not work (I wonder if a daemon process has been cut of relationship with stdout). Thanks for any help. I have tested syslog(). I find out: (1) The log messages will go into /var/log/messages and appear on the console only after I login in (as root). (2) The LOG_INFO priority does not cause the messages to appear on the console or to be written into file /var/log/messages. Can anyone explain the reason for me? Thanks a lot. Did you add an entry in /etc/syslog.conf for your daemon? If not check the man page for syslog.conf(5) for details ... -Zhihui #:^) -- So ya want ta here da roots? Dem that feels it knows it ... bush doctor derv...@bantu.cl.msu.edu To Unsubscribe: send mail to majord...@freebsd.org with unsubscribe freebsd-hackers in the body of the message