哪些系统将EAGAIN和EWOULDBLOCK定义为不同的值? [英] Which systems define EAGAIN and EWOULDBLOCK as different values?
问题描述
很好奇.哪些系统同时提供EAGAIN和EWOULDBLOCK #define
作为不同的值?
Just curious. Which systems providing both EAGAIN and EWOULDBLOCK #define
them as different values?
推荐答案
有一些...
可移植性注意:在许多较旧的Unix系统中,这种情况由EWOULDBLOCK指示,这是与EAGAIN不同的独特错误代码.为了使您的程序具有可移植性,您应该检查两个代码并对其进行相同处理.
Portability Note: In many older Unix systems, this condition was indicated by EWOULDBLOCK, which was a distinct error code different from EAGAIN. To make your program portable, you should check for both codes and treat them the same. http://lists.parisc-linux.org/hypermail/parisc-linux/9895.html 在某些SysV系统上,EAGAIN!= EWOULDBLOCK.我认为我们继承了
HPUX的errno定义... On some SysV systems EAGAIN != EWOULDBLOCK. I think we inherited the
errno definitions from HPUX... 较旧的AIX也是这样的系统: http://programming.itags.org/unix-linux-programming/81597/ Older AIX is such system too: http://programming.itags.org/unix-linux-programming/81597/ HP-UX(和AIX的较早版本) HP-UX (and older versions of AIX) 对于AIX,我找到了代码列表: http://homepage3.nifty.com/owl_h0h0/unix/job/UNIX/tutorial/error.html For AIX I found the list of codes: http://homepage3.nifty.com/owl_h0h0/unix/job/UNIX/tutorial/error.html 11个EAGAIN;
54 EWOULDBLOCK 11 EAGAIN;
54 EWOULDBLOCK
也是 OS/390: http://web.archiveorange.com/archive/v/zvbaIz8u6TzsQHHjfzOi OS/390和其他平台,其中EWOULDBLOCK!= EAGAIN OS/390 and other platforms where EWOULDBLOCK != EAGAIN 有更完整的表: http://www.ioplex.com/~miallen/errcmp .html 因此,AIX 4.3,5.1; HP-UX 11.22和OSF1对EAGAIN和EWOULDBLOCK使用不同的代码 So, AIX 4.3,5.1; HP-UX 11.22 and OSF1 uses different codes for EAGAIN and EWOULDBLOCK 这篇关于哪些系统将EAGAIN和EWOULDBLOCK定义为不同的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
SUSv3 AIX 4.3,5.1 HP-UX 11.22 Solaris 9,10 Linux 2.4.28,2.6.9 IRIX 6.5[4] OSF1 FreeBSD 5.2.1 OSX 10.3.8 MSVC6
EAGAIN 1 0 Resource unavailable, try again [3] 11 Resource temporarily unavailable 11 No more processes 11 Resource temporarily unavailable 11 Try again 11 Resource temporarily unavailable 11 ditto 35 Resource temporarily unavailable 35 Resource temporarily unavailable 11 Resource temporarily unavailable
EWOULDBLOCK 0.9 0 Operation would block [3] 54 Operation would block [2] 246 Operation would block 11 11 Operation would block 11 Resource temporarily unavailable 35 Operation would block 35 Operation would block 35 Operation would block