Req #77377 [NEW]: No way to handle CTRL+C in Windows
| From: | gadelat at gmail dot com | Date: | Sun, 30 Dec 2018 17:14:21 +0000 |
| Subject: | Req #77377 [NEW]: No way to handle CTRL+C in Windows | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-218689@lists.php.net to get a copy of this message | ||
From: gadelat at gmail dot com
Operating system: Windows 10
PHP version: 7.2Git-2018-12-30 (Git)
Package: Win32API related
Bug Type: Feature/Change Request
Bug description:No way to handle CTRL+C in Windows
Description:
------------
There is currently no way how to handle CTRL+C with PHP in Windows. This
makes it the only scripting language I know that cannot handle this and
pretty bad choice for writing cross platform compatible CLI
applications.
- handler registered via register_shutdown_function is not called for
CTR+C
- pcntl_signal relies on PCNTL extension which isn't available on
Windows
Notice that I am trying to avoid word "signal" here as you may argue
there are no signals in Windows. Developer still needs a way how to
handle CTRL+C press of end user.
This is important eg. for running cleanup tasks, as not even PHP's
tmpfile() cleanup logic is executed when user aborts program via CTRL+C.
--
Edit bug report at https://bugs.php.net/bug.php?id=77377&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77377&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77377&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77377&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77377&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77377&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77377&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77377&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77377&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77377&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77377&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77377&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77377&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77377&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77377&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77377&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77377&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77377&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77377&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77377&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77377&r=mysqlcfg