Menu
Reference
- Manticore\Ds
- Async
- Classes
- AggregateError
- CancellationToken
- CancelledException
- Channel
- ChannelClosedException
- Context
- DeadlockException
- Mutex
- Once
- Pool
- Received
- SelectCase
- Selected
- Semaphore
- Settled
- Task
- TaskGroup
- TimeoutException
- Functions
- async()
- awaitAll()
- awaitAllSettled()
- awaitAny()
- channel()
- delay()
- dump()
- dumpOn()
- failure()
- group()
- mapConcurrent()
- mapSettled()
- readFile()
- select()
- selectNow()
- selectWithin()
- shield()
- shutdownOn()
- spawn()
- stats()
- timeout()
- watchdog()
- writeFile()
- Http
- Http\WebSocket
- Buffer
- Process
- Io\Poll
- Manticore\Sapi
- Ffi
dumpOn()
function
function dumpOn(int ...$signals): void
Print dump() to STDERR whenever one of $signals arrives.
Go's SIGQUIT-dumps-every-goroutine, for interrogating a process that is already hung and cannot be restarted. SIGQUIT is the natural choice. The handler runs as ordinary async code (a daemon task), so the report is a consistent snapshot.
Async\async(function () {
Async\dumpOn(SIGQUIT); // then: kill -QUIT <pid>
serveForever();
});Parameters
...$signalsint- the signal numbers, e.g.
SIGQUIT
See also: dump, shutdownOn