php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35361 exit does not terminate
Submitted: 2005-11-24 10:38 UTC Modified: 2005-11-24 22:08 UTC
From: pd at tdcspace dot dk Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.4.1 OS: RedHat nix*
Private report: No CVE-ID: None
 [2005-11-24 10:38 UTC] pd at tdcspace dot dk
Description:
------------
just found that the... 

exit() 

inside a function does not terminate the script

below is a func that test for the precense of a dummy file which states that a previous job went well (if not - then terminate).

well it did give the message - but continued !

NOTE: PHP IS RUN AS CLI FROM CMD-LINE

Reproduce code:
---------------
function TestKillChkfile()
{
global $fn_check;
  if (!file_exists($fn_check)) exit("\r\nError : No check file");
  unlink($fn_check);
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-24 10:46 UTC] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.


 [2005-11-24 22:03 UTC] pb at tdcspace dot dk
THIS BUG REPORT MAY BE HIGHLY BUGGY

First - when reporting I did a spell mistake in the mail:

It's PB@tdcspace.dk and NOT PD@....

Second:

The report relates to two script that communicate success by creating/removing a dummy file (and exit). The scripts schedules each others as jobs and from the log I noticed that one script was scheduled by the other despite it  failed.

Fuzzy - but the short story is - that the synchronization may have failed by the same script running as two instances at the same time - thus garbling it's own error reporting.

This may very well lead to log messages, stating that the exit does'nt work.

So pls forgive - and remove/clear this report

Any re-entry about this "bug" - if so - will be with much more accurate testing.
 [2005-11-24 22:08 UTC] tony2001@php.net
.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 21:01:33 2024 UTC