Re: [PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-12 Thread Corinna Vinschen
On Jan 12 14:09, Jon Turney wrote: > On 11/01/2024 09:42, Corinna Vinschen wrote: > > I see. It's a bit unfortunate though, if dumper tries to create > > a 2 Gigs file which is later truncated, if we're low on disk space. > > But yeah, disk space isn't much of a problem these days, I guess... > >

Re: [PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-12 Thread Jon Turney
On 11/01/2024 09:42, Corinna Vinschen wrote: On Jan 10 17:38, Jon Turney wrote: On 10/01/2024 15:30, Corinna Vinschen wrote: On Jan 10 13:57, Jon Turney wrote: [...] Also: Fix the (deprecated) cygwin_dumpstack() function so it will now write a .stackdump file, even when ulimit -c is zero. (N

Re: [PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-11 Thread Corinna Vinschen
On Jan 10 17:38, Jon Turney wrote: > On 10/01/2024 15:30, Corinna Vinschen wrote: > > On Jan 10 13:57, Jon Turney wrote: > [...] > > > > > > Also: Fix the (deprecated) cygwin_dumpstack() function so it will now > > > write a .stackdump file, even when ulimit -c is zero. (Note that > > > cygwin_dum

Re: [PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-10 Thread Jon Turney
On 10/01/2024 15:30, Corinna Vinschen wrote: On Jan 10 13:57, Jon Turney wrote: [...] Also: Fix the (deprecated) cygwin_dumpstack() function so it will now write a .stackdump file, even when ulimit -c is zero. (Note that cygwin_dumpstack() is still idempotent, which is perhaps odd) Given it'

Re: [PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-10 Thread Corinna Vinschen
On Jan 10 13:57, Jon Turney wrote: > Factor out pre-formatting a command to be executed on a fatal signal, > and use that for both error_start (if present in the CYGWIN env var) and > for 'dumper'. > > Factor out executing that command, so we can use it from try_to_debug() > and when a fatal signa

[PATCH 1/2] Cygwin: Make 'ulimit -c' control writing a coredump

2024-01-10 Thread Jon Turney
Factor out pre-formatting a command to be executed on a fatal signal, and use that for both error_start (if present in the CYGWIN env var) and for 'dumper'. Factor out executing that command, so we can use it from try_to_debug() and when a fatal signal occurs. On a fatal signal, invoke dumper to