On Tue, Mar 06, 2012 at 04:01:47PM -0500, Wietse Venema wrote: > So you need a way for "postfix start" that returns status 0 if the > master(8) daemon initalizes successfully, and non-zero otherwise.
Correct. > I think this can be done by starting the master as a foreground > process. The foreground master forks a child process that will > become the master daemon that runs as a background process. > > The foreground master process waits for the "all is OK" signal from > the child process. When that happens, the foreground process > terminates with a 0 status, causing "postfix start" to return a 0 > status. This will normally take a fraction of a second. > > In case of problems (no response from child, child terminates) the > foreground process terminates with non-zero status, and "postfix > start" reports an error, and returns a non-zero exit status. > > Will that work? Yes, that will work. Thank you. -- Eray Aslan