Description of problem: The exit code after running virt-sandbox wraps at number 256,512 etc. back to 0. Version-Release number of selected component (if applicable): F19 RC1 kernel-3.9.5-301.fc19.x86_64 libvirt-sandbox-0.2.0-1.fc19.x86_64 libvirt-1.0.5.1-1.fc19.x86_64 How reproducible: 100% Steps to Reproduce: 1. Create a test command/script to execute inside the container # cat <<EOF >/usr/local/bin/exit-code-test.sh #!/bin/bash exit 256 EOF # chmod 755 /usr/local/bin/exit-code-test.sh 2. run the above command/script using virt-sandbox # virt-sandbox -c lxc:/// -n container-001 /usr/local/bin/exit-code-test.sh # echo $? For my testing I just repeated steps 1 and 2 editing the exit value in script exit-code-test.sh between test runs. Actual results: Exit code wraps at 256 and returns value 0 Expected results: Exit code should not wrap around and return the actual exit code of the command
Err, that's nothing todo with libvirt-sandbox. This is simply a UNIX limitation. You can't have any exit code > 255, since only 8 bits are available. You can see this just using bash directly # bash $ exit 256 # echo $? 0