[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command Line error on Sun4 CLISP



David Arnold <daa93@aber.ac.uk> found the reason for the EWOULDBLOCK error:
> I've run the program through a debugger and the code that generates
> the error is in the file 'stream.d' lines 931-936:
>       #else # non-blocking I/O ` la SYSV
>       { var reg2 int fcntl_flags;
>         if (( fcntl_flags = fcntl(handle,F_GETFL,0) )<0) { OS_error(); }
>         if ( fcntl(handle,F_SETFL,fcntl_flags|O_NDELAY) <0) { OS_error(); }
> -->     ergebnis = read(handle,&c,1); # Zeichen lesen versuchen
>         if ( fcntl(handle,F_SETFL,fcntl_flags) <0) { OS_error(); }
>       }
> The 'read' command generates the EWOULDBLOCK error.

Well done, your investigation! A couple of lines below that, the error
code is checked:
        if (errno==EAGAIN)
Change this to
        if ((errno==EAGAIN)||(errno==EWOULDBLOCK))

Thank you.

                    Bruno Haible
                    haible@ma2s2.mathematik.uni-karlsruhe.de