#47192 [Opn]: gethostbyname is not interruptible by signals

From: Date: Fri, 23 Jan 2009 13:52:07 +0000
Subject: #47192 [Opn]: gethostbyname is not interruptible by signals
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-133179@lists.php.net to get a copy of this message
ID: 47192 User updated by: fmassei at gmail dot com Reported By: fmassei at gmail dot com Status: Open -Bug Type: Feature/Change Request +Bug Type: Network related Operating System: linux PHP Version: 5.2.8 New Comment: Somehow I posted this bug in the wrong category. It's not a "Feature/Change Request" but more a "Network related" bug. Previous Comments: ------------------------------------------------------------------------ [2009-01-22 18:13:35] fmassei at gmail dot com Description: ------------ gethostbyname() is not interruptible by signals. If it cannot resolve an hostname there is no way it can be interrupted except for a SIGKILL. Reproduce code: --------------- declare(ticks=1); function al($sig) { echo $sig; exit(0); } pcntl_signal(SIGINT, "al"); pcntl_signal(SIGTERM, "al"); pcntl_signal(SIGALRM, "al"); pcntl_alarm(3); echo gethostbyname("google.com"); Expected result: ---------------- I was expected to interrupt gethostbyname() with any signal. Actual result: -------------- When running the above code, if the system cannot resolve google's hostname, the function blocks and doesn't respond to any signal. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47192&edit=1

« previous php.bugs (#133179) next »