1--TEST--
2pcntl_signal() context of realtime signal
3--EXTENSIONS--
4pcntl
5posix
6--SKIPIF--
7<?php if (!defined('SIGRTMIN')) die("skip realtime signal not supported"); ?>
8--FILE--
9<?php
10
11pcntl_signal(SIGRTMIN, function ($signo, $siginfo) {
12    printf("got realtime signal from %s, ruid:%s\n", $siginfo['pid'] ?? '', $siginfo['uid'] ?? '');
13});
14posix_kill(posix_getpid(), SIGRTMIN);
15pcntl_signal_dispatch();
16
17echo "ok\n";
18?>
19--EXPECTF--
20%rgot realtime signal from \d+, ruid:\d+%r
21ok
22