> Please add a comment in the handler saying that we resort to > polling on > OSes that do not support ‘prctl’. > > However, perhaps we should do: > > (lambda args > (let ((errno (system-error-errno args))) > (if (= ENOSYS errno) > check-for-dead-services > (apply throw args)))) > > so that important/unexpected errors are not silently ignored. I had quite liked the idea that it would just ignore any error and do the fallback, because really all we care about is "prctl failed" when deciding on our fallback logic. I've decided to just handle ENOSYS (prctl not available) and EINVAL (which is returned when PR_SET_CHILD_SUBREAPER not available), and throw for everything else. I'd love to be able to test this on platforms where prctl will actually fail, though, because I don't like the idea of committing code that I haven't actually been able to run. > If not, we should add in shepherd.texi, under “Slots of > services”, a few > words saying that when ‘running’ is an integer it is assumed to > be a > PID. I've done this, but while doing it I realised that this has always been true. The SIGCHLD handler has always assumed that a number indicates a running process, my modifications haven't changed the assumption, they've just widened its scope. Carlo