* Prevent "Connection reset by peer" messages from Cygwin. (Randy O'Meara)
- * Prevent some hangs at the end of a run on Cygwin. (Anthony Heading)
+ * Prevent some hangs at the end of a run on Cygwin. (Anthony Heading)
INTERNAL:
AC_MSG_CHECKING([whether to call shutdown on all sockets])
case $host_os in
*cygwin* ) AC_MSG_RESULT(yes)
- AC_DEFINE(SHUTDOWN_ALL_SOCKETS, 1, [Define if sockets need to be shutdown])
+ AC_DEFINE(SHUTDOWN_ALL_SOCKETS, 1,
+ [Define if sockets need to be shutdown])
+ ;;
+ * ) AC_MSG_RESULT(no);;
+esac
+
+AC_MSG_CHECKING([whether generator should delay before signaling receiver])
+case $host_os in
+ *cygwin* ) AC_MSG_RESULT(yes)
+ AC_DEFINE(DELAY_BEFORE_SIGNALING_RECEIVER, 1,
+ [Define if generator should delay before signaling receiver])
;;
* ) AC_MSG_RESULT(no);;
esac
io_flush();
io_set_error_fd(-1);
+#ifdef DELAY_BEFORE_SIGNALING_RECEIVER
/* workaround for cygwin hangs; wait to make sure child is ready */
msleep(100);
kill(pid, SIGUSR2);
+#endif
wait_process(pid, &status);
return status;
}