logd - job output logging daemon
Output is timestamped and written, with the job name, to /var/log/boot or stored in memory until the file is writable.
Once ready to receive connections, logd raises the SIGSTOP signal, putting itself to sleep until continued by another process.
After starting logd, init(8) waits for the process to stop if it hasn't already, and then sends it the SIGCONT signal so that it can proceed. Only once this has happened, will init(8) start other jobs.
When the --daemon option is given, this is not performed; instead logd will not detach from the console until it is listening on the socket.
init(8) opens a new connection for each job that is to be logged, binding the socket to the standard input, output and error file descriptors for the job.
Before running the job, it sends the job name on the socket so that it can be logged along with the messages. This is sent as a size_t that contains the length of the name to read, followed by that many character bytes. The NULL terminator is not sent as part of the protocol, it is up to the receiver to add that if required.
Further information about the job, such as its description, can be obtained by opening an ordinary connection to the init(8) daemon and querying it using the name received.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |