|  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: -
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
9 + 28 = ?
Subscribe to this entry?

 [2019-03-29 02:42 UTC] sarkedev+php at gmail dot com
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);'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-02 16:05 UTC] secteurhack at gmail dot com
This is not PHP related. You need to forwards signals to your container.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Apr 02 10:03:46 2023 UTC