summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@gnu.org>2006-11-27 15:19:17 +0000
committerThomas Schwinge <tschwinge@gnu.org>2006-11-27 15:19:17 +0000
commitec7f7778b12854a0faefaac341289445af9d7e7c (patch)
tree62f33004a2a5bd2fd68731a575b15b44e1fbcd66
parent3aeee385fdfa1ef0b230e56671655d3bfd9b7061 (diff)
2006-11-27 Ben Asselstine <benasselstine@canada.com>
Thomas Schwinge <tschwinge@gnu.org> * crash.c (trivfs_append_args): Handle CRASH_ORPHANS_HOW.
-rw-r--r--trans/ChangeLog5
-rw-r--r--trans/crash.c23
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 <benasselstine@canada.com>
+ Thomas Schwinge <tschwinge@gnu.org>
+
+ * crash.c (trivfs_append_args): Handle CRASH_ORPHANS_HOW.
+
2006-11-27 Thomas Schwinge <tschwinge@gnu.org>
* 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 };