Forum OpenACS Q&A: Response to Best OS for OpenACS - FreeBSD or Linux?

Collapse
Posted by Connie Hentosh on
Okay.. I think I have a valid solutions for the tcl exec problem. Can anyone tell me other problems occured with OpenBSD and OpenACS/Aolserver?

Here is the patch for aolserver3_3_1 (which compiles cleanly for OpenBSD without the mods to include/Makefile.global that 3.2 needed)

diff -u aolserver3_3_1/tcl8.3.2/unix/tclUnixPipe.c aolserver3_3_1_patched/tcl8.3.2/unix/tclUnixPipe.c
--- aolserver3_3_1/tcl8.3.2/unix/tclUnixPipe.c  Thu Aug 17 17:46:15 2000
+++ aolserver3_3_1_patched/tcl8.3.2/unix/tclUnixPipe.c  Mon Apr  9 13:52:39 2001
@@ -949,13 +949,16 @@
      * possible, if the channel is in blocking mode. If the channel is
      * nonblocking, the read will never block.
      */
-
-    bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead);
-    if (bytesRead > -1) {
-        return bytesRead;
+    while (1) {
+        bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead);
+        if (bytesRead > -1) {
+           return bytesRead;
+        }
+        if ( errno != EINTR ) {
+           *errorCodePtr = errno;
+           return -1;
+        }
     }
-    *errorCodePtr = errno;
-    return -1;
 }
 ^L
 /*