Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> start_daemon doesn't provide for switching to a non-root userid
> according to that spec, so it seems like *it's* missing a crucial
> detail.
Hmmm... I didn't see anything requiring that it only by run by root.
Do you see something that suggests that it must be?
I've been making my attempts as the owner of the cluster, assuming
that the init script would su to that before calling that function.
> it's unclear if killproc is supposed to wait to see whether the
> daemon terminates.
I think it's pretty clear, in the context of the whole spec, that it
should give it *some* time to make the attempt, since it says that it
should return zero if the daemon was successfully terminated and
non-zero otherwise. I think that also suggests that it doesn't expect
you to wait forever. You do kinda have to read between the lines and
take the spec from a "holistic" perspective, I'll grant you that....
-Kevin