[ClusterIt-CVS] CVS commit: src
Brought to you by:
garbled
|
From: Tim R. <ga...@us...> - 2007-01-18 18:02:41
|
Module Name: src Committed By: garbled Date: Thu Jan 18 18:02:31 UTC 2007 Modified Files: src/common: common.c src/dsh: dsh.c Log Message: Add \n to the end of the port test error message. Apply part of a patch for linux from a user: - The "dsh interactive mode" functionality is broken. There are two problems here. First, the "poll()-then-fgets()" loop in dsh.c assumes line buffered stdout from children. Under Linux, stdout from children is not line buffered so the fgets() does not consume all the stdout. I've fixed this by putting stdin and stderr in non-blocking mode and doing "poll()-then-loop-on-fgets()". Second, Linux's poll() does not return a POLLHUP event when the child's stdin is closed. My fix is to simply #ifndef linux around the close(STDIN_FILENO) in the child. To generate a diff of this commit: cvs rdiff -r1.26 -r1.27 src/common/common.c cvs rdiff -r1.32 -r1.33 src/dsh/dsh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. |