Added __invoke() to SignalTrap and fixed phpunit xml

This commit is contained in:
noccy committed 2020-06-06 23:00:48 +02:00
1 parent e8c4a85486
commit c855f92ecd
3 files changed
+16 -4

No files matched your search

+9 -2
View File
@@ -9,8 +9,15 @@ use NoccyLabs\Ipc\Signal\SignalTrap;
$trap = new SignalTrap(SIGINT);
echo "Press ctrl-c...\n";
while (!$trap->isTrapped()) {
while (!$trap->isTrapped(true)) {
usleep(10000);
}
echo "Thanks!\n";
echo "Thanks!\n";
echo "And once more...\n";
while (!$trap(true)) {
usleep(10000);
}
echo "Thanks!\n";