Hi all,
I've recently tried rsync in daemon mode on AIX. Unfortunately, after
handling connections, the daemon segfaulted. I've located this problem
to the signal handler for SIGCHLD in socket.c - it seems reinstalling
the signal handler before doing waitpid caused the signal to be
redelivered, so the program recurses to the signal handler before it
runs out of stack space in the end and segfaults. Simply moving the
handler reinstaller to after the waitpid seems to work (and should,
AFAIK not break anything on other systems).
I can also report that IPv6 seems to work fine on AIX (by editing
config.h after configuration), the only thing that bothers me is that
I haven't managed to make the same daemon listen on both v4 and v6
(with the same socket), but that's not something I really need.
(The above goes for rsync 2.6.1-pre1 built with Gcc 3.3.2 on AIX 5.2
[oslevel -r says 5200-02]).
-------------- next part --------------
*** socket.c.orig Mon Mar 29 15:29:10 2004
--- socket.c Mon Mar 29 15:30:23 2004
***************
*** 431,440 ****
static RETSIGTYPE sigchld_handler(UNUSED(int val))
{
- signal(SIGCHLD, sigchld_handler);
#ifdef WNOHANG
while (waitpid(-1, NULL, WNOHANG) > 0) {}
#endif
}
--- 431,440 ----
static RETSIGTYPE sigchld_handler(UNUSED(int val))
{
#ifdef WNOHANG
while (waitpid(-1, NULL, WNOHANG) > 0) {}
#endif
+ signal(SIGCHLD, sigchld_handler);
}
-------------- next part --------------
cheers
/Pontus
--
Pontus Sk?ld, see <URL:http://soua.net/> for more information.