File: resist-death.php

package info (click to toggle)
phabricator 0~git20190207-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 71,728 kB
  • sloc: php: 552,244; sql: 16,997; ansic: 3,619; yacc: 2,503; sh: 754; xml: 519; lex: 488; cpp: 221; python: 186; makefile: 177; sed: 66
file content (21 lines) | stat: -rwxr-xr-x 415 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env php
<?php

require_once dirname(__FILE__).'/../../__init_script__.php';

// This script just creates a process which is difficult to terminate. It is
// used for daemon resilience tests.

declare(ticks = 1);
pcntl_signal(SIGTERM, 'ignore');
pcntl_signal(SIGINT,  'ignore');

function ignore($signo) {
  return;
}

echo pht('Resisting death; sleeping forever...')."\n";

while (true) {
  sleep(60);
}