Module Async_unix.Dump_core_on_job_delay
Dump core if jobs are delayed, to get additional debug information when running on UNIX systems that support core dumps.
It is not normally enabled, but may be enabled for any program by setting the appropriate field, dump_core_on_job_delay, in the ASYNC_CONFIG environment variable.
module How_to_dump : sig ... endval start_watching : dump_if_delayed_by:Core.Time.Span.t -> how_to_dump:How_to_dump.t -> unitstart_watchingstarts a regular async job (viaClock.every) that increments a counter, and a C thread to make sure that the counter is incremented in a timely manner.
val dump_core : ?how_to_dump:How_to_dump.t -> unit -> unitdump_core ()dumps a core file using/usr/bin/gcoreif it exists, or by callingabort()if not (or with~how_to_dump:Call_abort). With gcore, the dump is done in a child process, and the core file is written to/tmp/core.$N.$PID, where$PIDis the process id and$Nis a counter that is incremented on each call todump_core.