Permalink
Browse files

Added test for issue #59

  • Loading branch information...
1 parent 3c4ae7c commit 0bb78f8398e2fbec681806ccce2fd1586687d42e @mkoppanen committed Jul 9, 2012
Showing with 35 additions and 0 deletions.
  1. +35 −0 tests/bug_gh_59.phpt
View
@@ -0,0 +1,35 @@
+--TEST--
+Test for Github issue #59
+--SKIPIF--
+<?php
+ require_once(dirname(__FILE__) . '/skipif.inc');
+
+ if (!extension_loaded ('pcntl'))
+ die("skip");
+?>
+--FILE--
+<?php
+
+include dirname(__FILE__) . '/zeromq_test_helper.inc';
+$client = create_client();
+
+// fork a child to execute cmd, in case it crashes
+$pid = pcntl_fork();
+if ($pid == -1)
+{
+ die('could not fork');
+}
+else if ($pid)
+{
+ // we are the parent
+ pcntl_wait($status);
+ $exitcode = pcntl_wexitstatus($status);
+}
+else
+ exit(0);
+
+echo "OK";
+
+
+--EXPECT--
+OK

0 comments on commit 0bb78f8

Please sign in to comment.