rndc halt -p behavior

Alan Clegg Alan_Clegg at isc.org
Thu Jan 22 00:05:31 UTC 2009


Rich Goodson wrote:

>> If -p is specified named's process id is returned. This allows an
>> external process to determine when named had completed halting.
> 
> Whether named is still answering queries or just cleaning up its
> allocated memory, the PID is returned BEFORE named is gone, as named is
> still running for a good while after the PID is returned (I've seen up
> to 15 or 20 seconds or so).  So, if I use this in a script, assuming the
> behavior that seems to be implied in the documentation, I'm going to be
> starting a new instance of named once the PID is returned, so I'm going
> to end up with 2 concurrent named processes.

You are expected to 'wait' on the PID that was returned before you start
anything new.  rndc operates asynchronously to the BIND process, so it
does not wait for BIND to exit.

Reference:  'man wait'

AlanC

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20090121/b718458d/attachment.bin>


More information about the bind-users mailing list