Re: patch to use pipe if socketpair fails
On Thu, Jul 24, 2003 at 12:16:11PM -0700, jw schultz wrote: On Thu, Jul 24, 2003 at 01:22:58PM +0300, Harri J{rvi wrote: if socketpair support has been compiled in but the host where rsync is run doesn't support it, you get error pipe failed in do_recv Rejected. Build for the platform. If you are doing a cross-platform build either use options to ./configure or modify config.h to match the target OS. I ran into this problem when I had a minimal Linux kernel compiled on a replicator boot disk. It had SOCKET support left out, and I got a cryptic error message. This would fix it. I won't argue about rejection of this patch. I just sen this mail to tell you that I wasn't doing a cross compile, but used a precompiled binary on a reduced kernel, and got confused about the error message. I investigated what went wrong and came up with this fix to let the binary decide which to use if socketpair isn't available. There might be other situtations where a socketpair might fail that I can't predict. Anyways. Thanks for reply. Yours, Harri Järvi Sorry, Cc me if replying to this -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
patch to use pipe if socketpair fails
Hi, if socketpair support has been compiled in but the host where rsync is run doesn't support it, you get error pipe failed in do_recv This patch makes rsync use pipe if socketpair fails. Yours, Harri Järvi CC me if you reply to this thread since I'm not on the mailing list --- rsync-2.5.5/util.c Wed Mar 20 03:09:49 2002 +++ util.c Thu Jul 24 13:11:45 2003 @@ -71,6 +71,10 @@ #if HAVE_SOCKETPAIR ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fd); +if (ret != 0) { +perror(socketpair failed. trying pipe); +ret = pipe(fd); +} #else ret = pipe(fd); #endif -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Re: patch to use pipe if socketpair fails
On Thu, Jul 24, 2003 at 01:22:58PM +0300, Harri J{rvi wrote: Hi, if socketpair support has been compiled in but the host where rsync is run doesn't support it, you get error pipe failed in do_recv Rejected. Build for the platform. If you are doing a cross-platform build either use options to ./configure or modify config.h to match the target OS. This patch makes rsync use pipe if socketpair fails. Yours, Harri Järvi CC me if you reply to this thread since I'm not on the mailing list Ick! -- J.W. SchultzPegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html