php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70776 phpdbg: terminating script by ctrl+c returns to prompt in -rr mode
Submitted: 2015-10-23 12:36 UTC Modified: 2015-10-27 14:42 UTC
From: bugs dot php dot net at majkl578 dot cz Assigned: bwoebi (profile)
Status: Closed Package: phpdbg
PHP Version: 7.0.0RC5 OS: Linux
Private report: No CVE-ID: None
 [2015-10-23 12:36 UTC] bugs dot php dot net at majkl578 dot cz
Description:
------------
When terminating a running script under phpdbg by ctrl+c, the execution does not stop, but falls back to phpdbg prompt.

Also it requires double ctrl+c, first has no effect (not sure if that is a bug as well though).

Tested with bash and dash.

Test script:
---------------
<?php
for (;;) {
        echo 1, PHP_EOL;
        sleep(1);
}

Actual result:
--------------
$ phpdbg -qrr test.php
1
^C1
^C[Current opline: in internal function sleep]
>00005: 	sleep(1);
 00006: }
 00007: 
prompt> 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-27 14:42 UTC] bwoebi@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: bwoebi
 [2015-10-27 14:42 UTC] bwoebi@php.net
Usually single ctrl+c halts on next opcode; double ctrl+c is halting the program immediately, in the middle of whatever it is doing.

I'm unsure whether to allow single ctrl+c to halt the program in -qrr mode or force termination...
 [2016-10-16 11:48 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e93eaee1648a55d3d58788e2b898e8fb00f0c13c
Log: Fixed bug #70776 (Simple SIGINT does not have any effect)
 [2016-10-16 11:48 UTC] bwoebi@php.net
-Status: Verified +Status: Closed
 [2016-10-16 11:48 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e93eaee1648a55d3d58788e2b898e8fb00f0c13c
Log: Fixed bug #70776 (Simple SIGINT does not have any effect)
 [2016-10-16 11:48 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e93eaee1648a55d3d58788e2b898e8fb00f0c13c
Log: Fixed bug #70776 (Simple SIGINT does not have any effect)
 [2016-10-17 10:06 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e93eaee1648a55d3d58788e2b898e8fb00f0c13c
Log: Fixed bug #70776 (Simple SIGINT does not have any effect)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 01:01:27 2024 UTC