summaryrefslogtreecommitdiff
path: root/ext/posix/tests/posix_kill_error.phpt
blob: e378fa241f8ffc4236e1d17742682ea63305005d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--TEST--
Test posix_kill() function : error conditions
--SKIPIF--
<?php
	if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
?>
--FILE--
<?php
echo "*** Testing posix_kill() : error conditions ***\n";


echo "\n-- Testing posix_kill() function with invalid signal --\n";
$pid = posix_getpid();
$sig = 999;
var_dump( posix_kill($pid, 999) );

echo "\n-- Testing posix_kill() function with negative pid --\n";
$pid = -999;
$sig = 9;
var_dump( posix_kill($pid, 999) );

echo "Done";
?>
--EXPECT--
*** Testing posix_kill() : error conditions ***

-- Testing posix_kill() function with invalid signal --
bool(false)

-- Testing posix_kill() function with negative pid --
bool(false)
Done