免费注册 查看新帖 |

Chinaunix

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

请问setsid函数在AIX和SCO下有什么区别吗 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-10-31 16:06 |只看该作者 |倒序浏览
请问setsid函数在AIX和SCO下有什么区别吗,为什么我的程序在SCO5.0.7上面没问题,在AIX5上面跑,遇到setsid()就跳出了呢,报错是Not owner.

论坛徽章:
0
2 [报告]
发表于 2006-04-24 13:45 |只看该作者
同问!\r\n望高手解答!

论坛徽章:
0
3 [报告]
发表于 2006-04-25 12:50 |只看该作者
setsid Subroutine\r\n\r\nPurpose\r\nCreates a session and sets the process group ID.\r\n\r\nLibrary\r\nStandard C Library (libc.a)\r\n\r\nSyntax\r\n\r\n#include <unistd.h>\r\n\r\npid_t setsid (void)\r\nDescription\r\nThe setsid subroutine creates a new session if the calling process is not a process group leader. Upon return, the calling process is the session leader of this new session, the process group leader of a new process group, and has no controlling terminal. The process group ID of the calling process is set equal to its process ID. The calling process is the only process in the new process group and the only process in the new session.\r\n\r\nReturn Values\r\nUpon successful completion, the value of the new process group ID is returned. Otherwise, (pid_t) -1 is returned and the errno global variable is set to indicate the error.\r\n\r\nError Codes\r\nThe setsid subroutine is unsuccessful if the following is true:\r\n\r\nEPERM The calling process is already a process group leader, or the process group ID of a process other than the calling process matches the process ID of the calling process.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP