summaryrefslogtreecommitdiff
path: root/trans/crash.c
AgeCommit message (Collapse)Author
2016-10-05trans/crash: Fix setting core file template at runtime.Justus Winter
* trans/crash.c (corefile_template_lock): New variable. (S_crash_dump_task): Serialize access to 'corefile_template'. (parse_opt): Likewise. Also strdup the template. (trivfs_append_args): Serialize access to 'corefile_template'.
2016-10-05trans/crash: Use empty core file templates to disable the feature.Justus Winter
* trans/crash.c (parse_opt): Use empty core file templates to disable the feature.
2016-10-05Avoid fatal error handling in option parsers.Justus Winter
* trans/crash.c (parse_opt): Avoid 'error' in favor of the appropriate argp error reporting mechanism. * trans/remap.c (parse_opt): Likewise. * utils/msgids.c (parse_opt): Likewise.
2016-08-09trans/crash: core file name templatesJustus Winter
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.
2016-06-07trans/crash: fix blunderJustus Winter
* trans/crash.c (S_crash_dump_task): Fix error handling.
2016-06-04trans/crash: fix resource leaksJustus Winter
Previously, 'task', 'core_file', and 'ctty_id' were not deallocated if crash was configured to write core files, and 'ctty_id' was leaked if the crashing task was suspended. This lead to resources not being released in the kernel, the filesystem, and the terminal subsystem, and could very well be responsible for making the Debian/Hurd shutdown hang. * trans/crash.c (S_crash_dump_task): Properly deallocate 'task', 'core_file', and 'ctty_id'.
2016-05-03Fix buildSamuel Thibault
* trans/crash.c: Include <assert.h>.
2016-02-21trans/crash: fix suspending taskJustus Winter
* trans/crash.c (S_crash_dump_task): Fix looking up 'user_proc'.
2015-09-27trans/crash: convert to trivfs dynamic classes and bucketsJustus Winter
libtrivfs contains two ways of managing more than one port class and bucket. There is the old way of using a statically allocated array with explicit length, and the new way with dynamically allocated vectors. Converting all users to the new way of handling multiple classes and/or buckets, we can simplify the code in libtrivfs. In many cases, the code will be simpler and more expressive for the user. This also fixes a mild bug. The classes and buckets given to `trivfs_startup' end up in the dynamic vectors too, making the object lookup code use the more complicated code path. * trans/crash.c: Convert to dynamic classes and buckets.
2015-03-05Fix space styleSamuel Thibault
2007-05-012007-05-01 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
* crash.c (S_msg_startup_dosync): Remove function.
2006-11-272006-11-27 Ben Asselstine <benasselstine@canada.com>Thomas Schwinge
Thomas Schwinge <tschwinge@gnu.org> * crash.c (trivfs_append_args): Handle CRASH_ORPHANS_HOW.
2006-11-272006-11-27 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge
* crash.c: Correct the usage of the argp documentation string.
2002-05-292002-05-28 Roland McGrath <roland@frob.com>Roland McGrath
* symlink.c (S_fsys_getroot, S_fsys_getfile): u_int -> size_t * streamio.c (device_open_reply): size_t -> int for dev_status_t * crash.c (S_msg_report_wait): int -> mach_msg_id_t (S_crash_dump_task): int -> integer_t
2002-05-282002-05-28 Roland McGrath <roland@frob.com>Roland McGrath
* streamio.c (device_open_reply): size_t -> int for dev_status_t * crash.c (S_msg_report_wait): int -> mach_msg_id_t
2002-03-112002-03-11 Roland McGrath <roland@frob.com>Roland McGrath
* crash.c: Add `corelimit' parameter to `dump_core' forward decl. (S_crash_dump_task): Change caller, pass (off_t)-1 for now. (struct crasher): New member `core_limit'. (dead_crasher): Pass C->core_limit to dump_core. (S_crash_dump_task): Set C->core_limit, to (off_t) -1 for now. (dump_core): Function removed; now ../exec/elfcore.c defines it. * Makefile (OBJS, crash): Add elfcore.o. (elfcore.c): vpath decl to find this in $(top_srcdir)/exec.
2001-02-12auth/Marcus Brinkmann
2001-02-12 Marcus Brinkmann <marcus@gnu.org> * auth.c (main): New variable ARGP defining a doc string. Pass address of ARGP to argp_parse(). exec/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * main.c: Change hurd version name from proc to exec. (main): Add period to doc string. ftpfs/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * ftpfs.c: Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. hostmux/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * hostmux.c: Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. usermux/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * usermux.c (options): Include <version.h>. Add global variable ARGP_PROGRAM_VERSION. Add period to DOC. trans/ 2001-02-12 Marcus Brinkmann <marcus@gnu.org> * fifo.c: Make version string say `fifo', not `null'. Add period to doc text in ARGP. * firmlink.c: Add period to doc text in ARGP_DOC, convert semi-colon to colon. * magic.c (options): Add period to DOC. * new-fifo.c (fifo_trans_parse_args): Add doc string to ARGP. Include <version.h>, new global variable ARGP_PROGRAM_VERSION. * crash.c: Include <version.h>, add global variable ARGP_PROGRAM_VERSION. * hello.c: Include <version.h>, add global variable ARGP_PROGRAM_VERSION. (hello_argp): Add doc string. * hello-mt.c: Likewise. * streamio.c: Add period to DOC. Change streamdev to streamio in version string. * password.c (main): Add period to doc string in ARGP.
2000-03-172000-03-17 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* crash.c (S_crash_dump_task): Use ports_get_send_right.
2000-01-292000-01-28 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* crash.c (enum crash_action): New alternative crash_unspecified (0). (crash_orphans_how): New variable. (S_crash_dump_task): If crash_how != crash_orphans_how, ascertain if the task is an orphan before deciding what to do. (options): New options --action, --orphan-action. Old options now compatability aliases for --action=foo. (parse_opt): Parse them. (doc): New variable. (crash_argp): Use DOC.
1999-09-011999-08-31 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>Roland McGrath
* crash.c (trivfs_modify_stat): Remove redundant fstype setting. * password.c (trivfs_modify_stat): Likewise.
1999-07-111999-07-10 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* crash.c: Add #include <sys/mman.h> for munmap decl.
1999-07-031999-07-03 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell
* crash.c (stop_pgrp): Use munmap instead of vm_deallocate.
1999-06-011999-06-01 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* crash.c (options): Add --dump-core as alias for --core-file.
1999-06-011999-06-01 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath
* crash.c: Support three modes of operation, selected by command line switches: -s/--suspend suspend crashing process (old behavior) -k/--kill kill crashing process, no core dump -c/--core-file dump core file (enum crash_action): New type. (crash_how): New variable. (options, crash_argp, trivfs_runtime_argp): New variables. (parse_opt, trivfs_append_args): New functions. (main): Call argp_parse.
1997-08-20Wed Aug 20 14:07:56 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell
* crash.c (main): New args for ports_manage_port_operations_multithread. * fifo.c (main): Likewise. * firmlink.c (main): Likewise. * new-fifo.c (main): Likewise. * null.c (main): Likewise.
1996-07-13(stop_pgrp): Fetch pgrp using correct call.Michael I. Bushnell
1996-07-08(stop_pgrp): Don't do anything if ORPHANED.Michael I. Bushnell
1996-07-08(stop_pgrp): Take second arg CTTYID. Fetch each pgrp member's msgpor andRoland McGrath
send msg_sig_post with that as refport instead of calling POSIX.1 kill function like a bonehead. (S_crash_dump_task): Pass CTTY_ID arg through to stop_pgrp.
1996-07-08(S_crash_dump_task): fixupMichael I. Bushnell
1996-07-08(stop_pgrp): New function.Michael I. Bushnell
(S_crash_dump_task): Call stop_pgrp.
1996-07-01(S_msg_describe_ports): New function.Michael I. Bushnell
1996-07-01(S_crash_dump_task): Drop arg TARGET.Michael I. Bushnell
(dump_core): Likewise; all callers changed. (struct crasher): Delete member `target'.
1996-07-01(S_crash_dump_task): New args EXC, CODE, SUBCODE, CTTY_ID. SupplyMichael I. Bushnell
SIGCODE arg to proc_mark_stop. (signal_crasher): New arg SIGCODE, supply to proc_mark_exit. All callers changed. (S_msg_sig_post_untraced): Supply C->sigcode to proc_mark_stop.
1996-06-21typo fixesRoland McGrath
1996-04-27Use ports_create_port instead of ports_allocate_port, and notice the error.Roland McGrath
1995-12-15Initial revisionRoland McGrath