2.1.1p2 HP-UX 11 timing error

Kevin Steves stevesk at sweden.hp.com
Sun Jul 9 01:37:55 EST 2000


Hi,

On Thu, 6 Jul 2000, Marquess, Steve Mr JMLFDC wrote:
: FYI in order to get 2.1.1p2 to work on my HP-UX 11.0 systems I had to patch
: atomicio.c for EWOULDBLOCK (HP read() does not give the POSIX return code).
: The new atomicio() is a clean fix for this timing problem; all it needs now
: is this one little tweak.
: 
: *** atomicio.c	Thu Jun 22 07:32:31 2000
: --- /tmp/atomicio.c	Thu Jul  6 09:03:30 2000
: ***************
: *** 46,52 ****
:   		res = (f) (fd, s + pos, n - pos);
:   		switch (res) {
:   		case -1:
: ! 			if (errno == EINTR || errno == EAGAIN)
:   				continue;
:   		case 0:
:   			return (res);
: --- 46,56 ----
:   		res = (f) (fd, s + pos, n - pos);
:   		switch (res) {
:   		case -1:
: ! 			if (errno == EINTR || errno == EAGAIN
: ! #ifdef _HPUX_SOURCE
: ! 			|| (errno == EWOULDBLOCK)
: ! #endif
: ! 			)
:   				continue;
:   		case 0:
:   			return (res);

Which problem(s) does this fix?  If read() is really returning
EWOULDBLOCK instead of EAGAIN for POSIX non-blocking IO we should file a
defect and get it fixed.  There was an old problem with send() returning
EWOULDBLOCK that was fixed over a year ago.  Which ARPA transport patch
do you have installed?  This was the defect information in the patch
README:

               ( SR number:   [5003446658/STARS-ACTIVE/English]  ; Defect:  JAGaa45906 )
        send() when called non-blocking returns EWOULDBLOCK
        rather than EAGAIN.

I have a test program and I don't see EWOULDBLOCK for sockets.






More information about the openssh-unix-dev mailing list