mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-12 14:48:13 +00:00
rustjail: close stdin in execute_hook after it was sent
So that hook program could receive EOF. Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
parent
bb08131151
commit
d2041001ed
@ -1602,6 +1602,9 @@ async fn execute_hook(logger: &Logger, h: &Hook, st: &OCIState) -> Result<()> {
|
||||
.write_all(state.as_bytes())
|
||||
.unwrap();
|
||||
|
||||
// Close stdin so that hook program could receive EOF.
|
||||
child.stdin.take();
|
||||
|
||||
// read something from stdout for debug
|
||||
let mut out = String::new();
|
||||
child
|
||||
|
Loading…
Reference in New Issue
Block a user