<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Basically, I'm trying to use a shell script to replace the missing 'restart' argument to rndc, so I was looking for some sort of return value that tells me, "hey, your old named process is now gone, feel free to start a new one".</div><div><br></div><div>What doesn't seem to jibe to me with the behavior I see is this line:</div><div><br></div><div></div><blockquote type="cite"><div>If -p is specified named's process id is returned. This allows an external process to determine when named had completed halting.</div></blockquote><div><br></div><div>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.</div><div><br></div><div>I understand that I probably seem like a pedantic pain in the ass, but is this broken, or is the documentation wrong? You seem to be saying that rndc is behaving correctly, so I must therefore assume that the documentation is wrong in this respect and use some sort of logic in my script to tell me when named has gone *poof*.</div><div><br></div><div>Unless the documentation is using a different definition of the word "halt" than I am, which is entirely possible. I'm defining "halted" in my head as the process is gone and no longer appears in a process listing, whereas you may be defining "halted" as when named has stopped answering queries and has released its hold on port 53. If this is the case, it might not be a big deal if there are two concurrent named processes, as the new one is free to grab the port and start answering queries while the old one simply cleans up after itself, memory-wise.</div><div><br></div><div>-rich</div></div><div><div><span class="Apple-style-span" style="font-family: -webkit-monospace; font-size: 10px; "><div><br></div></span><div><div>On Jan 21, 2009, at 5:00 PM, Mark Andrews wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>In message <<a href="mailto:2971F259-4897-48F8-B418-2F759907596B@gronkulator.com">2971F259-4897-48F8-B418-2F759907596B@gronkulator.com</a>>, Rich Goodson<br> writes:<br><blockquote type="cite">The behavior of 'rndc halt -p' appears to be different from the =20<br></blockquote><blockquote type="cite">documentation.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">According to the BIND 9.4 ARM rndc section:<br></blockquote><blockquote type="cite">halt [-p] Stop the server immediately. Recent changes made through =20<br></blockquote><blockquote type="cite">dynamic update or IXFR<br></blockquote><blockquote type="cite">are not saved to the master =EF=AC=81les, but will be rolled forward =<br></blockquote><blockquote type="cite">from the =20<br></blockquote><blockquote type="cite">journal =EF=AC=81les when the<br></blockquote><blockquote type="cite">server is restarted. If -p is speci=EF=AC=81ed named=E2=80=99s process =<br></blockquote><blockquote type="cite">id is =20<br></blockquote><blockquote type="cite">returned. This allows an external<br></blockquote><blockquote type="cite">process to determine when named had completed halting.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">But the actual behavior seems to be that 'rndc halt -p' returns =20<br></blockquote><blockquote type="cite">immediately with the PID of named, but a 'ps -ef' shows named still =20<br></blockquote><blockquote type="cite">running until it's done answering its unfinished recursive queries (or =20=<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">whatever it's busy doing).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Is rndc broken, or is the documentation wrong, or am I missing =20<br></blockquote><blockquote type="cite">something?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If it makes a difference, this is on a server that exclusively does =20<br></blockquote><blockquote type="cite">recursive resolution and does not serve any authoritative zones.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-rich<br></blockquote><br><span class="Apple-tab-span" style="white-space:pre"> </span>named is just freeing all memory that it has allocated. If there<br><span class="Apple-tab-span" style="white-space:pre"> </span>has been a memory leak this is when it will be detected.<br><br><span class="Apple-tab-span" style="white-space:pre"> </span>Mark<br>-- <br>Mark Andrews, ISC<br>1 Seymour St., Dundas Valley, NSW 2117, Australia<br>PHONE: +61 2 9871 4742 INTERNET: <a href="mailto:Mark_Andrews@isc.org">Mark_Andrews@isc.org</a><br><br></div></blockquote></div><br></div></div></body></html>