From ec7f7778b12854a0faefaac341289445af9d7e7c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 27 Nov 2006 15:19:17 +0000 Subject: 2006-11-27 Ben Asselstine Thomas Schwinge * crash.c (trivfs_append_args): Handle CRASH_ORPHANS_HOW. --- trans/ChangeLog | 5 +++++ trans/crash.c | 23 +++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/trans/ChangeLog b/trans/ChangeLog index fa061239..47f4bd94 100644 --- a/trans/ChangeLog +++ b/trans/ChangeLog @@ -1,3 +1,8 @@ +2006-11-27 Ben Asselstine + Thomas Schwinge + + * crash.c (trivfs_append_args): Handle CRASH_ORPHANS_HOW. + 2006-11-27 Thomas Schwinge * crash.c: Correct the usage of the argp documentation string. diff --git a/trans/crash.c b/trans/crash.c index 493554a7..bd57497b 100644 --- a/trans/crash.c +++ b/trans/crash.c @@ -505,18 +505,33 @@ error_t trivfs_append_args (struct trivfs_control *fsys, char **argz, size_t *argz_len) { + error_t err; const char *opt; switch (crash_how) { - case crash_suspend: opt = "--suspend"; break; - case crash_kill: opt = "--kill"; break; - case crash_corefile:opt = "--core-file"; break; + case crash_suspend: opt = "--action=suspend"; break; + case crash_kill: opt = "--action=kill"; break; + case crash_corefile: opt = "--action=core-file"; break; default: return EGRATUITOUS; } + err = argz_add (argz, argz_len, opt); - return argz_add (argz, argz_len, opt); + if (!err) + { + switch (crash_orphans_how) + { + case crash_suspend: opt = "--orphan-action=suspend"; break; + case crash_kill: opt = "--orphan-action=kill"; break; + case crash_corefile: opt = "--orphan-action=core-file"; break; + default: + return EGRATUITOUS; + } + err = argz_add (argz, argz_len, opt); + } + + return err; } struct argp crash_argp = { options, parse_opt, 0, doc }; -- cgit v1.2.3