亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2731 | 回復(fù): 3
打印 上一主題 下一主題

關(guān)于errno [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2011-08-09 15:02 |只看該作者 |倒序?yàn)g覽
DESCRIPTION
       The  <errno.h> header file defines the integer variable errno, which is set by system calls and some library functions in
       the event of an error to indicate what went wrong.  Its value is significant only when the call returned an  error  (usu鈥[m
       ally -1), and a function that does succeed is allowed to change errno.

       Sometimes,  when -1 is also a valid successful return value one has to zero errno before the call in order to detect pos鈥[m
       sible errors.

       errno is defined by the ISO C standard to be a modifiable lvalue of type int, and must not be explicitly declared;  errno
       may be a macro.  errno is thread-local; setting it in one thread does not affect its value in any other thread.       Valid  error numbers are all non-zero; errno is never set to zero by any library function.  All the error names specified
       by POSIX.1 must have distinct values, with the exception of EAGAIN and EWOULDBLOCK, which may be the same.

       Below is a list of the symbolic error names that are defined on Linux.  Some of these are marked POSIX.1, indicating that
       the name is defined by POSIX.1-2001, or C99, indicating that the name is defined by C99.


errno是線程本地存儲的?
另外如果recv系統(tǒng)調(diào)用導(dǎo)致errno被設(shè)置為EINTER,其它的系統(tǒng)調(diào)用如果調(diào)用成功了,errno有時(shí)會被設(shè)置為0,有時(shí)還是舊值,怎么回事情啊?

論壇徽章:
6
金牛座
日期:2013-10-08 10:19:10技術(shù)圖書徽章
日期:2013-10-14 16:24:09CU十二周年紀(jì)念徽章
日期:2013-10-24 15:41:34獅子座
日期:2013-11-24 19:26:19未羊
日期:2014-01-23 15:50:002015年亞洲杯之阿聯(lián)酋
日期:2015-05-09 14:36:15
2 [報(bào)告]
發(fā)表于 2011-08-09 16:11 |只看該作者
回復(fù) 1# phoxia
errno是線程存儲的。
errno不會被置成0。

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2011-08-10 09:47 |只看該作者
線程存儲的話,那么如果開10個(gè)線程,每個(gè)線程的errno都可能不同么?

論壇徽章:
6
金牛座
日期:2013-10-08 10:19:10技術(shù)圖書徽章
日期:2013-10-14 16:24:09CU十二周年紀(jì)念徽章
日期:2013-10-24 15:41:34獅子座
日期:2013-11-24 19:26:19未羊
日期:2014-01-23 15:50:002015年亞洲杯之阿聯(lián)酋
日期:2015-05-09 14:36:15
4 [報(bào)告]
發(fā)表于 2011-08-11 14:50 |只看該作者
回復(fù) 3# phoxia
因?yàn)槭蔷程存儲的,所以不同的線程errno的值是有可能不相同的。
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP