svn commit: r223827 - projects/jailconf/usr.sbin/jail
Jamie Gritton
jamie at FreeBSD.org
Wed Jul 6 21:49:56 UTC 2011
Author: jamie
Date: Wed Jul 6 21:49:56 2011
New Revision: 223827
URL: http://svn.freebsd.org/changeset/base/223827
Log:
Don't report errors for the exit status of processes that are killed
as part of jail removal (IP_STOP_TIMEOUT).
Note a jail as "removed" even if it wasn't jail_remove() that did
the deed, e.g. if it already went away because all its processes
were killed.
Modified:
projects/jailconf/usr.sbin/jail/command.c
Modified: projects/jailconf/usr.sbin/jail/command.c
==============================================================================
--- projects/jailconf/usr.sbin/jail/command.c Wed Jul 6 21:40:48 2011 (r223826)
+++ projects/jailconf/usr.sbin/jail/command.c Wed Jul 6 21:49:56 2011 (r223827)
@@ -150,11 +150,15 @@ finish_command(struct cfjail *j)
if (!(j->flags & JF_SLEEPQ))
return 0;
j->flags &= ~JF_SLEEPQ;
- if (*j->comparam != IP_STOP_TIMEOUT) {
- paralimit++;
- if (!TAILQ_EMPTY(&runnable))
- requeue(TAILQ_FIRST(&runnable), &ready);
+ if (*j->comparam == IP_STOP_TIMEOUT)
+ {
+ j->flags &= ~JF_TIMEOUT;
+ j->pstatus = 0;
+ return 0;
}
+ paralimit++;
+ if (!TAILQ_EMPTY(&runnable))
+ requeue(TAILQ_FIRST(&runnable), &ready);
error = 0;
if (j->flags & JF_TIMEOUT) {
j->flags &= ~JF_TIMEOUT;
@@ -270,8 +274,8 @@ run_command(struct cfjail *j)
case IP__OP:
if (down) {
- if (jail_remove(j->jid) == 0 && verbose >= 0 &&
- (verbose > 0 || (j->flags & JF_STOP
+ (void)jail_remove(j->jid);
+ if (verbose > 0 || (verbose == 0 && (j->flags & JF_STOP
? note_remove : j->name != NULL)))
jail_note(j, "removed\n");
j->jid = -1;
More information about the svn-src-projects
mailing list