免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2719 | 回复: 6
打印 上一主题 下一主题

[函数] system函数返回768表示什么意思呢 [复制链接]

论坛徽章:
7
巨蟹座
日期:2015-07-09 16:10:34未羊
日期:2015-07-09 16:11:49数据库技术版块每日发帖之星
日期:2015-12-03 06:20:00数据库技术版块每日发帖之星
日期:2015-12-05 06:20:00数据库技术版块每日发帖之星
日期:2016-03-28 06:20:00IT运维版块每日发帖之星
日期:2016-04-11 06:20:00IT运维版块每日发帖之星
日期:2016-05-22 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-01-05 10:45 |只看该作者 |倒序浏览
rt,返回值放在WEXITSTATUS(76 = 3;    这是何意。求解

论坛徽章:
7
巨蟹座
日期:2015-07-09 16:10:34未羊
日期:2015-07-09 16:11:49数据库技术版块每日发帖之星
日期:2015-12-03 06:20:00数据库技术版块每日发帖之星
日期:2015-12-05 06:20:00数据库技术版块每日发帖之星
日期:2016-03-28 06:20:00IT运维版块每日发帖之星
日期:2016-04-11 06:20:00IT运维版块每日发帖之星
日期:2016-05-22 06:20:00
2 [报告]
发表于 2015-01-05 10:46 |只看该作者
WEXITSTATUS(76  =  3

论坛徽章:
7
巨蟹座
日期:2015-07-09 16:10:34未羊
日期:2015-07-09 16:11:49数据库技术版块每日发帖之星
日期:2015-12-03 06:20:00数据库技术版块每日发帖之星
日期:2015-12-05 06:20:00数据库技术版块每日发帖之星
日期:2016-03-28 06:20:00IT运维版块每日发帖之星
日期:2016-04-11 06:20:00IT运维版块每日发帖之星
日期:2016-05-22 06:20:00
3 [报告]
发表于 2015-01-05 10:46 |只看该作者
WEXITSTATUS(768) = 3

论坛徽章:
6
酉鸡
日期:2013-11-04 15:30:02巳蛇
日期:2014-01-23 10:36:23双鱼座
日期:2014-01-23 13:08:332015亚冠之鹿岛鹿角
日期:2015-09-03 14:36:002015亚冠之武里南联
日期:2015-09-18 10:48:1315-16赛季CBA联赛之山西
日期:2016-05-05 00:05:33
4 [报告]
发表于 2015-01-05 11:00 |只看该作者
WEXITSTATUS(status)
returns the exit status of the child. This consists of the least significant 8 bits of the status argument that the child specified in a call to exit(3) or _exit(2) or as the argument for a return statement in main(). This macro should only be employed if WIFEXITED returned true.

论坛徽章:
7
巨蟹座
日期:2015-07-09 16:10:34未羊
日期:2015-07-09 16:11:49数据库技术版块每日发帖之星
日期:2015-12-03 06:20:00数据库技术版块每日发帖之星
日期:2015-12-05 06:20:00数据库技术版块每日发帖之星
日期:2016-03-28 06:20:00IT运维版块每日发帖之星
日期:2016-04-11 06:20:00IT运维版块每日发帖之星
日期:2016-05-22 06:20:00
5 [报告]
发表于 2015-01-05 11:05 |只看该作者
回复 4# Dannysd
多谢回帖指点!!他是一个取子进程返回状态的宏?查资料是这样说的,但高于255的值是不是没有意义啊??那这代表函数的执行状态是什么样的呢?

   

论坛徽章:
6
酉鸡
日期:2013-11-04 15:30:02巳蛇
日期:2014-01-23 10:36:23双鱼座
日期:2014-01-23 13:08:332015亚冠之鹿岛鹿角
日期:2015-09-03 14:36:002015亚冠之武里南联
日期:2015-09-18 10:48:1315-16赛季CBA联赛之山西
日期:2016-05-05 00:05:33
6 [报告]
发表于 2015-01-05 11:12 |只看该作者
回复 5# qw10371006


   https://stackoverflow.com/questi ... lang-process-status

    WEXITSTATUS(status) returns the exit status of the child. This consists of the least significant 8 bits of the status argument that the child specified in a call to exit(3) or _exit(2) or as the argument for a return statement in main(). This macro should only be employed if WIFEXITED returned true.

    看来至少是8位,不知道跟环境有没有关系

论坛徽章:
7
巨蟹座
日期:2015-07-09 16:10:34未羊
日期:2015-07-09 16:11:49数据库技术版块每日发帖之星
日期:2015-12-03 06:20:00数据库技术版块每日发帖之星
日期:2015-12-05 06:20:00数据库技术版块每日发帖之星
日期:2016-03-28 06:20:00IT运维版块每日发帖之星
日期:2016-04-11 06:20:00IT运维版块每日发帖之星
日期:2016-05-22 06:20:00
7 [报告]
发表于 2015-01-07 18:35 |只看该作者
依旧没有找到头绪,猜测可能是进程数量过多,还有可能是信号问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP