changeset 28516 | 3bf2892f685f |
parent 28477 | 194a6cd873cd |
child 28535 | aa082a8125da |
--- a/contrib/chg/chg.c Mon Mar 14 12:32:09 2016 +0000 +++ b/contrib/chg/chg.c Mon Mar 14 12:52:35 2016 +0000 @@ -460,6 +460,11 @@ "%s", *pinst + 9); if (r < 0 || r >= (int)sizeof(opts->redirectsockname)) abortmsg("redirect path is too long (%d)", r); + } else if (strncmp(*pinst, "exit ", 5) == 0) { + int n = 0; + if (sscanf(*pinst + 5, "%d", &n) != 1) + abortmsg("cannot read the exit code"); + exit(n); } else { abortmsg("unknown instruction: %s", *pinst); }