mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-05 15:37:02 +08:00
Do not use stream encoders
Marshall the raw objects for the sync pipes so that no new line chars are left behind in the pipe causing errors. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
package libcontainer
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -12,6 +11,7 @@ import (
|
||||
|
||||
"github.com/docker/docker/pkg/mount"
|
||||
"github.com/opencontainers/runc/libcontainer/configs"
|
||||
"github.com/opencontainers/runc/libcontainer/utils"
|
||||
)
|
||||
|
||||
func newTestRoot() (string, error) {
|
||||
@@ -179,5 +179,5 @@ func marshal(path string, v interface{}) error {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
return json.NewEncoder(f).Encode(v)
|
||||
return utils.WriteJSON(f, v)
|
||||
}
|
||||
|
Reference in New Issue
Block a user