Hi Erik, thanks for your suggestions.
We're aware that VBoxManage at the moment doesn't do an optimal job at the moment when it comes to exit codes, e.g. they're somewhat rarely used besides 0. Also they often only indicate the bare minimum required for getting a shell script to work. However, if you need to do more advanced work I'd recommend using our API instead of using VBoxManage as a client. There you have a much more fine-grained control on what happened compared to plain old exit codes returned by VBoxManage. I'll think about the PID output on successful start and the exit code handling; both sound like a useful improvement to me. For 4.1 we probably won't touch the current behavior, but for the 4.2(.x) branch we certainly can improve things a bit. Regards, -Andy On 01.09.2012 20:29, Erik Leunissen wrote: > Hi, > > When not using one of the flags --wait-stdout --wait-stderr or > --wait-exit to "VBoxManage guestcontrol execute", the current[*] > behaviour w.r.t. exit code and standard output is: > > a. nothing is written to stdout, unless the --verbose flag was specified > on the command line. > b. the exit code is invariably 1, indicating failure, even if the > process was launched successfully. > > > I'd like to propose to change this behaviour as follows: > > a. result on stdout is the PID of the newly launched process (just the > number), without needing to pass the --verbose flag on the command line. > b. exit code indicates success of program launch (exit code = 0), or > some failure (exit code<> 0) > > Advantages (IMHO) over the current behaviour: > - correct distinction between success and failure of program launch, > where real failure cases can be handled specifically. > - straightforward support for further programmatic control of the newly > launched process through its PID > > Any comments, thoughts ... ? > > > Greetings, > > Erik Leunissen. > > -- > [*] Version 4.1.18, Host: Linux OpenSuSE 11.4, Guest: Windows Vista > > _______________________________________________ > vbox-dev mailing list > [email protected] > https://www.virtualbox.org/mailman/listinfo/vbox-dev -- Kind regards / Mit freundlichen Grüßen ****************************************************************** Andreas Löffler | VirtualBox Engineering Senior Software Engineer | Oracle Virtualization ORACLE Deutschland B.V. & Co. KG Werkstrasse 24 D-71384 Weinstadt, Germany Hauptverwaltung: Riesstr. 25, D-80992 München Registergericht: Amtsgericht München, HRA 95603 Geschäftsführer: Jürgen Kunz Komplementärin: ORACLE Deutschland Verwaltung B.V. Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697 Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher _______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
