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

minor things #74

Merged
merged 4 commits into from
Mar 17, 2022
Merged

minor things #74

merged 4 commits into from
Mar 17, 2022

Conversation

brho
Copy link
Collaborator

@brho brho commented Mar 10, 2022

feel free to drop any or all of these.

Barret Rhoden added 2 commits March 10, 2022 07:55
Signed-off-by: Barret Rhoden <[email protected]>
This lets you get debug info from cpud's child processes.  The info will
be outputted in the cpu client's stream.

Signed-off-by: Barret Rhoden <[email protected]>
Barret Rhoden added 2 commits March 15, 2022 11:57
It was almost equivalent to cmds/cpu/doc.go, execpt the 'cpu' version
had changes from commit b07df11 ("cpu: alphabetize options, update
doc.go").

Signed-off-by: Barret Rhoden <[email protected]>
The return code for bash is the return code for the last command in
bash.  If cpu HOST bash then ran a command that failed, cpud would think
that the shell failed.  It wouldn't propagate the exact error code
either.  cpu on the client side would get an exit code of 1.  e.g.

	$ cpu HOST sh
	sh-5.1# ^C
	sh-5.1#
	exit
	2022/03/10 08:55:28 CPUD(as remote):exit status 130
	2022/03/10 08:55:28 SSH error Process exited with status 1
	$ echo $?
	1

Although it might be nice to propagate the error code (e.g. 130) to cpu,
just ignoring the error is probably easier for users to handle.

sshd seems to have some error propagation.  If you ctl-c, then ctl-d,
ssh returns 0.  If you ls no-such-file, ssh returns 1, not 2 (which is
what bash returns).

Alternatively we could just propagate the '1', like ssh does, and not
spit out the error messages.

Signed-off-by: Barret Rhoden <[email protected]>
@brho brho requested a review from rminnich March 15, 2022 17:12
@rminnich rminnich merged commit 4f9ca71 into u-root:main Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants