Last active
December 25, 2015 01:59
-
-
Save neerolyte/6899314 to your computer and use it in GitHub Desktop.
Segfaulting php when using pcntl functions and postgres
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dbh = new PDO("pgsql:dbname=test;user=postgres"); | |
if (pcntl_fork()) { | |
// give child a moment to shutdown | |
usleep(200000); | |
// do anything with the db... segfault! | |
$dbh->query("select version();"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running it produces a segfault:
The core: