From owner-freebsd-jail@freebsd.org Tue Apr 30 18:04:02 2019 Return-Path: Delivered-To: freebsd-jail@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 367A6159976A for ; Tue, 30 Apr 2019 18:04:02 +0000 (UTC) (envelope-from foo.squiggly@yandex.com) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C934862AC for ; Tue, 30 Apr 2019 18:03:59 +0000 (UTC) (envelope-from foo.squiggly@yandex.com) Received: from mxback15j.mail.yandex.net (mxback15j.mail.yandex.net [IPv6:2a02:6b8:0:1619::91]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 6C62C1D40708 for ; Tue, 30 Apr 2019 21:03:56 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback15j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id WXr0JEYhEl-3tBK3mLM; Tue, 30 Apr 2019 21:03:55 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1556647435; bh=H/t8kclIgT6wuCzBA57VcygEa8Sv1M00QAYsQDI5W0k=; h=Message-Id:Date:Subject:To:From; b=X6Jcqs8iYM6T4mtTGzzz0kgrFADpfpMcwomQgnMAXyRwLGilv2EWtJ1UibxGbEz3+ SP3kR3TNu0z7JlfSg+t3hrnyek5Saa/MnXoYcNPzytvtudvf3n3KTqPJ+jpyIKjVNx hkixNiNwQcq7zJ2pRQ3eE0Uas8PW9HHwdY/1OSQQ= Received: by iva8-3b901672a9c5.qloud-c.yandex.net with HTTP; Tue, 30 Apr 2019 21:03:55 +0300 From: squiggly foo Envelope-From: foo-squiggly@yandex.com To: freebsd-jail@freebsd.org Subject: Application Jail Shutdown Problem MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Wed, 01 May 2019 03:03:55 +0900 Message-Id: <22066461556647435@iva8-3b901672a9c5.qloud-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Rspamd-Queue-Id: 3C934862AC X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yandex.com header.s=mail header.b=X6Jcqs8i; dmarc=pass (policy=none) header.from=yandex.com; spf=pass (mx1.freebsd.org: domain of foo.squiggly@yandex.com designates 2a02:6b8:0:1472:2741:0:8b7:102 as permitted sender) smtp.mailfrom=foo.squiggly@yandex.com X-Spamd-Result: default: False [-7.76 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[yandex.com:s=mail]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a02:6b8:0:1000::/52]; FREEMAIL_FROM(0.00)[yandex.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-jail@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[yandex.com:+]; MX_GOOD(-0.01)[mx.yandex.ru,mx.yandex.ru,mx.yandex.ru,mx.yandex.ru,mx.yandex.ru]; DMARC_POLICY_ALLOW(-0.50)[yandex.com,none]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; IP_SCORE(-3.68)[ip: (-9.78), ipnet: 2a02:6b8::/32(-4.80), asn: 13238(-3.84), country: RU(0.00)]; RCVD_IN_DNSWL_LOW(-0.10)[2.0.1.0.7.b.8.0.0.0.0.0.1.4.7.2.2.7.4.1.0.0.0.0.8.b.6.0.2.0.a.2.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yandex.com]; ASN(0.00)[asn:13238, ipnet:2a02:6b8::/32, country:RU]; MIME_TRACE(0.00)[0:+] X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2019 18:04:02 -0000 Hi All, I use the mount.fstab parameter to mount a number of file systems before starting a jail which works without any problem. However since it is an application jail, there are no other processes running inside the jail other than the one application. As soon as that application terminates the jail is removed by the host. This is actually my preferred behavior; I want the jail to be removed when the process inside of it terminates. But the problem is that the mount points are not unmounted after the jail is removed that way. The only way I can get the jails to unmount is if I do a "jail -r jailname" which is what I want to avoid as I would not do that while the process inside the jail is still running. Does anyone know of a way for the jails to umount the mount points in its fstab file when the only process inside the jail exits? Thanks! foo