Return to Snippet

Revision: 36118
at November 18, 2010 06:21 by zuzara


Initial Code
<?php
$image = new Imagick;
$image->newImage(700, 394, 'red');

$pid = pcntl_fork();
switch ($pid) {
case 0:
    run();
    exit;
case -1:
    throw new Exception("fork failed!");
default:
    break;
}
function run()
{
    $image = new Imagick;
    echo 'hey', PHP_EOL;
    $image->newImage(700, 394, 'blue');
    echo 'doesnt reach...', PHP_EOL;
    $image->setImageFormat('jpeg');
    $image->setCompressionQuality(90);
    $image->writeImage('/tmp/hoge.jpg');
}

Initial URL

                                

Initial Description
MacOS 10.6.5 PHP 5.3.3

Initial Title
Somehow a child process quit after called Imagick::newImage

Initial Tags
php

Initial Language
PHP