php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #10524 register_shutdown_function request
Submitted: 2001-04-27 09:23 UTC Modified: 2010-11-24 13:29 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: development at digitekdesign dot com Assigned: jani (profile)
Status: Closed Package: *General Issues
PHP Version: 4.0 Latest CVS (27/04/2001) OS: Linux 2.2.19
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: development at digitekdesign dot com
New email:
PHP Version: OS:

 

 [2001-04-27 09:23 UTC] development at digitekdesign dot com
It would be helpful if when a script is aborted with CTRL-c while running on the console that PHP would still call the function named in register_shutdown_function instead of just completely stopping.

One possible extension could be that the first time CTRL-c is received, jump to the shutdown function and if a second is received abort immediately.

I'm not sure if this request is possible, but it certainly would be helpful.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-24 13:29 UTC] jani@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: jani
 [2010-11-24 13:29 UTC] jani@php.net
Using pcntl it is, works fine with PHP 5.3:

<?php

function shutdown_cb()
{
    echo "shutdown!";
    exit;
}

pcntl_signal(SIGINT, "shutdown_cb");

while(1)
    pcntl_signal_dispatch();

?>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 18:01:31 2024 UTC