Skip to content

14.3 jexec not returning cmd exit code #816

@brian90013

Description

@brian90013

Hello and thank you for your work on cbsd. I am seeing a change in behavior between cbsd 14.2.6 running on a FreeBSD 14.2 host and cbsd 14.3.0 running on a FreeBSD 14.3 host. I am used to cbsd jexec returning the exit code of the cmd run in the jail. However with the latest version, I am always getting a return value of 0. I checked that cbsd initenv was run after the last upgrade. I also looked at recent issues and PRs but could not find a similar issue. I hope this is user error on my part but am unable to determine what is wrong. Thank you for your help!

user@host:~ $ true
user@host:~ $ echo $?
0
user@host:~ $ false
user@host:~ $ echo $?
1

# Running 14.2.6 and seeing cmd return value
user@host:~ $ sudo cbsd --version
14.2.6
user@host:~ $ uname -a
FreeBSD ci-freebsd14-amd64 14.2-RELEASE FreeBSD 14.2-RELEASE releng/14.2-n269506-c8918d6c7412 GENERIC amd64
user@host:~ $ sudo cbsd jexec jname=jail14_2 'true'
user@host:~ $ echo $?
0
user@host:~ $ sudo cbsd jexec jname=jail14_2 'false'
user@host:~ $ echo $?
1

# Running 14.3.0 and always getting 0
user@host:~ $ sudo cbsd --version
14.3.0
user@host:~ $ uname -a
FreeBSD ci-freebsd14-amd64 14.3-RELEASE FreeBSD 14.3-RELEASE releng/14.3-n271432-8c9ce319fef7 GENERIC amd64
user@host:~ $ sudo cbsd jexec jname=jail14_3 'true'
user@host:~ $ echo $?
0
user@host:~ $ sudo cbsd jexec jname=jail14_3 'false'
user@host:~ $ echo $?
0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions