On Wed, 25 Oct 2006 12:25:34 -0700 Wes wrote: WH> >>>>> "RS" == Robert Story <[EMAIL PROTECTED]> writes: WH> WH> RS> Actually, after looking at the code, the closing of the pipe/fd is WH> RS> a signal to the persist app, which should terminate on that WH> RS> condition. Thus, I think this is a bug in the persist script, not WH> RS> the agent. WH> WH> The reason for the TERM signal is that without it the agent hangs.
No, without it a poorly written script hangs. The same could be said for a non-persist pass script, or even a C module. We can't cover all the bases. If we had multiple bug reports of this problem, it be one thing. But we have 1, against code which I'm guessing hasn't changed in a while. And the existing system should work. A script that gets EOF on a read should exit cleanly. It also *punishes* properly written scripts which expect to be able to shut down cleanly. This puts the kill() pretty much immediately after the pipes are closed. That could mean data loss for those scripts. WH> perfect (I agree it'd be better to do better cleanup during a HUP WH> including a potential "notify" followed by a "sleep/wait" followed by WH> actual dealing with things; but that's a MAJOR rewrite of a huge WH> amount of code unless you do a notify/sleep/wait per potential open WH> sub-thingy which would be a very slow HUP handle)... I don't think a major re-write is in order... A simple timer callback registered when the pipes are closed should do the trick. No need to hold up the HUP processing. WH> I'm actually only just over the fence about whether it should go into WH> 5.4. But I'm over it none the less, because the case is rare and WH> doing a blocking wait on a PID that will never exit seems broken. I agree that this case should be fixed. I do not agree that this is the way to fix it. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders