Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

posix_setsid() 返回 -1 时是错误的 #26

Open
dchaofei opened this issue Jul 20, 2018 · 0 comments
Open

posix_setsid() 返回 -1 时是错误的 #26

dchaofei opened this issue Jul 20, 2018 · 0 comments

Comments

@dchaofei
Copy link
Contributor

你好,我看到手册里 posix_setsid() 函数的返回值

Returns the session id, or -1 on errors.

下边这样的写法是不是错误的:

if (!posix_setsid()) {
    exit(' setsid error. ');
}

是不是应该这样:

if (-1 === posix_setsid()) {
    exit(' setsid error. ');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant