Next | qmail | 13 |
qmail-send is always running, usually firing off deliveries
But if it has nothing to do, it might go to sleep
It does this by trying to read queue/lock/trigger, which is a pipe file
Unix puts it to sleep until there is something in the pipe
If qmail-queue writes a byte into the pipe, qmail-send wakes up
Then it examines queue/todo immediately
This a simple, reliable way to get one program to wake up another
It's tempting to try to use signals
This is better
Signals can get lost
Signals can kill the process
The byte in the pipe is safe
And it stays in the pipe until it is read by qmail-send
Next | Copyright © 2004 M. J. Dominus |