This repository has been archived by the owner on Feb 24, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this commit, if
rkt enter
was executed without theTERM
environment variable set, a segfault could occur.
This commit treats an unset TERM environment variable as meaning 'xterm'
and avoids the segfault.
This is more noticeable in environments where rkt is the child of some non-terminal process (e.g. the kubelet).
Related to kubernetes/kubernetes#25430
I reproduced this via
sudo sh -c 'unset TERM && rkt enter $uid ls'
on my machine, though I'm not certain that it reproduces consistently on all machines. I could not reproduce it after this change.I wasn't sure if it was preferable to leave
TERM
blank when it is unset for the caller and I'm open for any discussion / arguments there.cc @dgonyeo