php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42481 posix_setsid() return -1 on errors,not 0 or false
Submitted: 2007-08-30 07:27 UTC Modified: 2007-08-30 07:33 UTC
From: surfchen at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Debian 4.1.1-21
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: surfchen at gmail dot com
New email:
PHP Version: OS:

 

 [2007-08-30 07:27 UTC] surfchen at gmail dot com
Description:
------------
There is a mistake here(http://www.php.net/manual/en/ref.pcntl.php) on invoking  posix_setsid(),which is return -1 on errors.

Reproduce code:
---------------
if (!posix_setsid()) {
    die("could not detach from terminal");
}

Expected result:
----------------
When a error occurs,the msg"could not detach from terminal" should be printed.But since the posix_setsid() return -1 on errors,nothing is printed in this case.

Actual result:
--------------
nothing is printed

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-30 07:33 UTC] rquadling@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of rquadling
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=55a51786be06ece2140bb75168efcc609aaad1bc
Log: Fix #42481 - Example corrected.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 28 18:00:03 2025 UTC