php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77818 When run through Docker, the process does not exit after a Ctrl+C SIGINT
Submitted: 2019-03-29 02:42 UTC Modified: -
From: sarkedev+php at gmail dot com Assigned:
Status: Open Package: CGI/CLI related
PHP Version: 7.3.3 OS: Linux Ubuntu bionic
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-03-29 02:42 UTC] sarkedev+php at gmail dot com
Description:
------------
I'll use this simple example to illustrate the problem, but it could be any script that might be stuck.


php -r 'while(1) sleep(1);'

This can be killed with Ctrl+C.



docker run -it php:cli php -r 'while(1) sleep(1);'

This can't be killed with Ctrl+C.  It's also not possible to kill in the shell inside the container, and it can also not be killed by killing the parent docker process.  Only the root on the host can kill it.

Test script:
---------------
docker run -it php:cli php -r 'while(1) sleep(1);'


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 18:01:26 2019 UTC