-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Close the stdin/tty when using podman as a restAPI. #8717
Conversation
Helps fix: #8700 |
@mtrmac @vrothberg PTAL |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code does not compile but that is definitely what I want.
cmd/podman/system/service.go
Outdated
@@ -53,6 +54,9 @@ func init() { | |||
|
|||
timeFlagName := "time" | |||
flags.Int64VarP(&srvArgs.Timeout, timeFlagName, "t", 5, "Time until the service session expires in seconds. Use 0 to disable the timeout") | |||
ttyFlagName := "tty" | |||
flags.BoolVar(&srvArgs.TTY, ttyFlagName, false, "Allow stdin to interact with the service") | |||
_ = srvCmd.RegisterFlagCompletionFunc(ttyFlagName, completion.AutocompleteNone) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_ = srvCmd.RegisterFlagCompletionFunc(ttyFlagName, completion.AutocompleteNone) |
Bool flags should not have this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b84a719
to
0310a5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mtrmac Ok, now I am using unix.Dup2 and looking at the process fds, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. (I’m not going to worry about flushing buffers…)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
LGTM |
Ext. services: you'll need to rebase, sorry. See #8726 (comment) for context |
e43225f
to
c7125c2
Compare
/hold |
Currently the service is attempting to prompt on shortname expansion if you run with a terminal. This change will cause the service to default to no terminal and not prompt. Signed-off-by: Daniel J Walsh <[email protected]>
New changes are detected. LGTM label has been removed. |
/hold cancel |
Currently the service is attempting to prompt on shortname expansion if you run
with a terminal. This change will cause the service to default to no terminal
and not prompt.
Signed-off-by: Daniel J Walsh [email protected]