php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60018 no more received signal after pcntl_exec
Submitted: 2011-10-08 22:36 UTC Modified: 2013-06-26 19:43 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: n dot escuder at atlantis-software dot net Assigned: mike (profile)
Status: Not a bug Package: PCNTL related
PHP Version: 5.4.16 OS: Linux 3.9
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: n dot escuder at atlantis-software dot net
New email:
PHP Version: OS:

 

 [2011-10-08 22:36 UTC] n dot escuder at atlantis-software dot net
Description:
------------
No more received the signal HUP after using pcntl_exec

Test script:
---------------
#!/bin/php
<?php

function sig_handler()
{
    echo "sig_handler() called\n";
    pcntl_exec( "/test.php" );
}

echo "set signal\n";
pcntl_signal( SIGHUP, "sig_handler" );

while ( 1 ) {
  pcntl_signal_dispatch();
  sleep(1 );
}

?>

Expected result:
----------------
first kill -HUP PID
show :
sig_handler() called

do a second kill -HUP PID
and show :
sig_handler() called

Actual result:
--------------
first kill -HUP PID
show :
sig_handler() called

do a second kill -HUP PID
and nothing append and no more possible to do a CTRL+C on the program


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-06 11:05 UTC] n dot escuder at atlantis-software dot net
-Operating System: Linux 3.0 +Operating System: Linux 3.6 -PHP Version: 5.3.8 +PHP Version: 5.4.9
 [2012-12-06 11:05 UTC] n dot escuder at atlantis-software dot net
Always have this bug... i need a patch for my cli scripts
 [2013-06-26 16:23 UTC] n dot escuder at atlantis-software dot net
-Operating System: Linux 3.6 +Operating System: Linux 3.9 -PHP Version: 5.4.9 +PHP Version: 5.4.16
 [2013-06-26 16:23 UTC] n dot escuder at atlantis-software dot net
This problem always exist.... Please i need signals in php cli
 [2013-06-26 19:43 UTC] mike@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: mike
 [2013-06-26 19:43 UTC] mike@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

pcntl_exec replaces the current process, try exec instead.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC