advanced-php icon indicating copy to clipboard operation
advanced-php copied to clipboard

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

Open dchaofei opened this issue 6 years ago • 0 comments

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

Returns the session id, or -1 on errors.

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

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

是不是应该这样:

if (-1 === posix_setsid()) {
    exit(' setsid error. ');
}

dchaofei avatar Jul 20 '18 09:07 dchaofei