CLOUDSTACK-6662
CLOUDSTACK-6844

 exit status delivery might get delayed

 Please enter the commit message for your changes. Lines starting

(cherry picked from commit 2ec7359b4eb501b0d9e80ed87af7a54938e9d505)