Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix incorrect status code from runCommandStatus #101

Merged
merged 1 commit into from
May 26, 2018
Merged

fix incorrect status code from runCommandStatus #101

merged 1 commit into from
May 26, 2018

Conversation

s3rj1k
Copy link
Contributor

@s3rj1k s3rj1k commented May 24, 2018

runCommandStatus should return correct status codes (use of WEXITSTATUS macro)
as lxc-execute does in https://github.com/lxc/lxc/blob/master/src/lxc/tools/lxc_execute.c#L239

@brauner
Copy link
Member

brauner commented May 24, 2018

Hey, thanks for the patch. You need to sign-off your commit though. :)

@s3rj1k
Copy link
Contributor Author

s3rj1k commented May 24, 2018

Hi @brauner, how do i sign-off?

@brauner
Copy link
Member

brauner commented May 24, 2018

git commit -s or simply add a line:

Signed-off-by: Your Name <valid-email@address.com>

at the end of your commit message.

@s3rj1k
Copy link
Contributor Author

s3rj1k commented May 25, 2018

@brauner done, thanks

runCommandStatus should return correct status codes (use of WEXITSTATUS macro)
as lxc-execute does in https://github.com/lxc/lxc/blob/master/src/lxc/tools/lxc_execute.c#L239

Signed-off-by: s3rj1k <evasive.gyron@gmail.com>
[christian.brauner@ubuntu.com: mirror WEXITSTATUS() correctly]
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
@brauner
Copy link
Member

brauner commented May 25, 2018

Hm, on second thought this might break existing users since this changes the behavior of RunCommand.
//cc @stgraber

@stgraber
Copy link
Member

@brauner would this impact LXD? That's the only major project with stable releases out there where we may really need to be careful about potentially breaking all exit codes.

@brauner
Copy link
Member

brauner commented May 26, 2018

LXD does not call any of those functions currently. So, no. Feel free to merge then.

@stgraber
Copy link
Member

Okay, sounds worth fixing then.

@stgraber stgraber merged commit dd9d132 into lxc:v2 May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants