Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Dec 2025 09:15:45 +0000
From:      Roman Bogorodskiy <novel@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 611bbb190ff5 - main - bhyve: change suspend exit code
Message-ID:  <693d2ec1.307f9.15123720@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help

The branch main has been updated by novel:

URL: https://cgit.FreeBSD.org/src/commit/?id=611bbb190ff593e0e424e311575d7e978e623659

commit 611bbb190ff593e0e424e311575d7e978e623659
Author:     Roman Bogorodskiy <novel@FreeBSD.org>
AuthorDate: 2025-12-05 17:16:29 +0000
Commit:     Roman Bogorodskiy <novel@FreeBSD.org>
CommitDate: 2025-12-13 09:12:38 +0000

    bhyve: change suspend exit code
    
    Currently, after suspending, bhyve(8) exits with 0. This code is
    also used to indicate that a VM was rebooted. To differentiate
    reboot and suspend, use the next available exit code, 5, for suspend.
    
    Approved by:            markj
    Sponsored by:           The FreeBSD Foundation
    MFC after:              2 weeks
    Differential Revision:  https://reviews.freebsd.org/D54087
---
 usr.sbin/bhyve/bhyve.8    | 4 +++-
 usr.sbin/bhyve/snapshot.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index 45450b5b5db5..0893b0b719bc 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 28, 2025
+.Dd December 4, 2025
 .Dt BHYVE 8
 .Os
 .Sh NAME
@@ -1158,6 +1158,8 @@ halted
 triple fault (amd64 only)
 .It 4
 exited due to an error
+.It 5
+suspended
 .El
 .Sh EXAMPLES
 If not using a boot ROM, the guest operating system must have been loaded with
diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c
index 997faa254284..eabe6ab47f80 100644
--- a/usr.sbin/bhyve/snapshot.c
+++ b/usr.sbin/bhyve/snapshot.c
@@ -1308,7 +1308,7 @@ vm_checkpoint(struct vmctx *ctx, int fddir, const char *checkpoint_file,
 
 	if (stop_vm) {
 		vm_destroy(ctx);
-		exit(0);
+		exit(5);
 	}
 
 done:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?693d2ec1.307f9.15123720>