php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33505 proc_terminate does not really kill terminate the process
Submitted: 2005-06-29 10:18 UTC Modified: 2021-03-16 12:33 UTC
Votes:7
Avg. Score:3.6 ± 1.5
Reproduced:6 of 6 (100.0%)
Same Version:2 (33.3%)
Same OS:5 (83.3%)
From: osama at wayout dot net Assigned: cmb (profile)
Status: Closed Package: Program Execution
PHP Version: 5.1.0b2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: osama at wayout dot net
New email:
PHP Version: OS:

 

 [2005-06-29 10:18 UTC] osama at wayout dot net
Description:
------------
I am using PHP5.1.0b1

As per the documentation, proc_terminate should send the process started by proc_open a specified signal. However, practically speaking, it actually sends the signal to the shell (/bin/sh) process and not to the process that was started by the shell.

This usually causes a problem since the signal never reaches the actual process and hence it never terminates (i.e. or receives the signal).

For example, when sending the SIGTERM to a process started by proc_open, only the /bin/sh process terminates while the main process (tcpdump in my case) never terminates.

I am using pipes to communicate to the process.

Reproduce code:
---------------
Not needed.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 22:56 UTC] cmb@php.net
-Package: Feature/Change Request +Package: Program Execution
 [2021-03-16 12:33 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-03-16 12:33 UTC] cmb@php.net
As of PHP 7.4.0, the first argument to prop_open() can be an
array, in which case no shell is involved at all, what should
solve your issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 14 11:01:32 2024 UTC