-
Notifications
You must be signed in to change notification settings - Fork 29
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
spurious error return of -1 at end of successful invocation #40
Comments
might be similar to what i get. i can get a return of 1 by doing a ctl-c before ctl-d when running bash. This is with just hitting ctl-d, and i get no error:
This is with hitting ctl-c, then ctl-d
|
do you still get this one? i still get my version of it, every time. i can try debugging it too. |
ok for my specific thing, that's actually not a bug. the shell actually returns 130, just as the output says. without using cpu at all:
wtf is 130? that's SIGINT + 128 why is that the return value of sh? (which is bash btw, on my system). because it looks like when bash exits, its exit status is the status of its last command. that's certainly the behavior of bash scripts, and it makes sense they do it for the shell process itself too. e.g.
also, this looks different than your bug, since you're not using a shell. anyway, what's the fix? one option would be to ignore all errors that came from shells. perhaps in cpud handler(), isPty case, don't check the error value? though that's less than ideal, since i think that's the cpud --remote command, not the actual shell. btw, at this point, cpud has lost the error code. i.e. instead of 130, it thinks it is '1'. and not only that, but the string "exit status 1"
that "cmd exit status 1" is "cmd %v", err. i think you might want the args swapped to that printf. (cmd, err, cmd.ProcessState. not err, cmd, cmd.ProcessState) is there any way to know if we're in a shell inside runRemote()? if not, maybe we need an arg from cpud to cpud --remote, e.g. "--ignore-cmd-error", so we can suppress this. |
Not sure why this happens, but it is happening on a pcengines/apu2
The text was updated successfully, but these errors were encountered: