From: hno <> Date: Wed, 3 May 2000 02:21:04 +0000 (+0000) Subject: hno squid-2.2.STABLE5.ipc_hello.patch X-Git-Tag: SQUID_3_0_PRE1~2012 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f106bc5399ee316247ec7bcd1d7ce7dfd5d99e1a;p=thirdparty%2Fsquid.git hno squid-2.2.STABLE5.ipc_hello.patch Squid-2.2.STABLE5: ipc hello test fails on some platforms/compilers A missing \0 string terminator could on some platforms/compilers cause squid to fail the hello test used when starting child processes. --- diff --git a/src/ipc.cc b/src/ipc.cc index dd3a713570..3b22f43c54 100644 --- a/src/ipc.cc +++ b/src/ipc.cc @@ -1,6 +1,6 @@ /* - * $Id: ipc.cc,v 1.19 2000/05/02 20:12:09 hno Exp $ + * $Id: ipc.cc,v 1.20 2000/05/02 20:21:04 hno Exp $ * * DEBUG: section 54 Interprocess Communication * AUTHOR: Duane Wessels @@ -228,14 +228,14 @@ ipcCreate(int type, const char *prog, char *const args[], const char *name, int return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } if (type == IPC_UDP_SOCKET) { - x = send(cwfd, hello_string, strlen(hello_string), 0); + x = send(cwfd, hello_string, strlen(hello_string) + 1, 0); if (x < 0) { debug(50, 0) ("sendto FD %d: %s\n", cwfd, xstrerror()); debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n"); _exit(1); } } else { - if (write(cwfd, hello_string, strlen(hello_string)) < 0) { + if (write(cwfd, hello_string, strlen(hello_string) + 1) < 0) { debug(50, 0) ("write FD %d: %s\n", cwfd, xstrerror()); debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n"); _exit(1);