diff options
author | Justus Winter <justus@gnupg.org> | 2016-06-03 00:52:06 +0200 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-08-09 23:34:17 +0200 |
commit | 02f5c0208985d60fede08c1eafad04e80353b670 (patch) | |
tree | 9938dc957282b5b47750ebeb67f54b1966ee8d4b /hurd | |
parent | c8c973750b949f8c4fcac020c61a3b99e5d5c3a2 (diff) |
trans/crash: core file name templates
Add an option to specify a template used to construct core file names.
This way core files can be collected at a predictable central
location.
* hurd/crash.defs (crash_dump_task): Return EEXIST if the core file
has been written elsewhere.
* trans/crash.c (corefile_template): New variable.
(template_valid): New function.
(template_make_file_name): Likewise.
(S_crash_dump_task): Use the template to construct a name, open the
file, and write the core dump there instead of the handle provided by
the caller.
(argp_option): New option.
(doc): Document the format.
(parse_opt): Handle new option
(trivfs_append_args): Likewise.
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/crash.defs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hurd/crash.defs b/hurd/crash.defs index 442957d1..42958617 100644 --- a/hurd/crash.defs +++ b/hurd/crash.defs @@ -25,8 +25,10 @@ subsystem crash 32000; /* Handle a crashing task, whose task control port is TASK. - FILE is a file port open for writing. The caller will link it to "core" - (or whatever name) if the RPC returns success. + FILE is a file port open for writing. The caller will link it to + "core" (or whatever name) if the RPC returns success. If EEXIST is + returned, the core file has been written to a different file, + therefore FILE can be discarded. SIGNO, SIGCODE, and SIGERROR indicate the signal that killed the process. EXC is zero for a software signal; otherwise EXC, CODE, and |