Finally fixed the bug. (1) Apply the patch indicated in my last email.
(2) "#define HAVE_FORK 1" in "dxconfig.h". At least for linux, it is not correctly configured. I don't know why. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Junren Shi Sent: Thursday, July 11, 2002 6:54 PM To: [email protected] Subject: Re: [opendx-dev] Outboard module doesn't work. It seems to me the function "_dxfCompleteServer" in "src/exec/dpexec/ccm.c" will not return correct file id for the connection. This could be the cause of the bug. The following is my suggestion for the bug. However, I have not tested the codes, because I can not conpile the code in my computer. Sorry. --- ccm.c.orig 2002-07-11 17:44:20.000000000 -0400 +++ ccm.c 2002-07-11 17:45:33.000000000 -0400 @@ -265,7 +265,7 @@ if (FD_ISSET(sock, &fds)) { length = sizeof(server); - if (accept(sock, (struct sockaddr *)&server, &length) < 0) + if ((fd = accept(sock, (struct sockaddr *)&server, &length)) < 0) { perror ("accept"); goto error; @@ -275,13 +275,14 @@ else { length = sizeof (userver) - sizeof(userver.sun_path) + strlen (userver.sun_path); - if (accept(usock, (struct sockaddr *)&userver, &length) < 0) + if ((fd = accept(usock, (struct sockaddr *)&userver, &length)) < 0) { perror ("accept"); goto error; } } #endif + return fd; error: #if DXD_SOCKET_UNIXDOMAIN_OK @@ -292,5 +293,5 @@ #endif if (sock >= 0) close (sock); - return (fd); + return -1; } Junren
