Hi,
Thanks for contacting me about this.
It's an interesting report -- probably the only substantive vsftpd bug I've had
in a long time.
vsftpd isn't really maintained by me any more (the Linux distributions do it).
That said, I've got an alternative patch that I think might tackle the root
cause of this. I've pasted it below, I hope it's useful.
Cheers
Chris
--- a/standalone.c
+++ b/standalone.c
@@ -228,7 +228,7 @@ vsf_standalone_main(void)
die("accept");
}
- ++s_children;
+ __sync_fetch_and_add(&s_children, 1);
@@ -251,7 +251,7 @@ vsf_standalone_main(void)
/* fork() failed, drop the count back out */
drop_ip_count(p_raw_addr);
- --s_children;
+ __sync_fetch_and_sub(&s_children, 1);
@@ -302,7 +302,7 @@ handle_sigchld(void* duff)
/* Account for the child dying */
- --s_children;
+ __sync_fetch_and_sub(&s_children, 1);
Regards,
Robert