Flush stdin from within chroot archive
This makes sure that we don't buffer in memory and that we also flush stdin from diff as well as untar. Signed-off-by: Michael Crosby <crosbymichael@gmail.com> Conflicts: pkg/chrootarchive/diff.go
This commit is contained in:
parent
a8124280d2
commit
cd74be68b8
4 changed files with 27 additions and 4 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
@ -40,9 +39,7 @@ func untar() {
|
|||
fatal(err)
|
||||
}
|
||||
// fully consume stdin in case it is zero padded
|
||||
if _, err := ioutil.ReadAll(os.Stdin); err != nil {
|
||||
fatal(err)
|
||||
}
|
||||
flush(os.Stdin)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue