summaryrefslogtreecommitdiff
path: root/cmd/rootlessport
diff options
context:
space:
mode:
authorArthur Sengileyev <arthur.sengileyev@gmail.com>2022-08-16 13:39:02 +0300
committerArthur Sengileyev <arthur.sengileyev@gmail.com>2022-08-23 11:06:51 +0300
commitf87f6d2fc193c9b53ac8ba634954a811a32fd057 (patch)
tree69a7d69ad68a697416171627ccba44814e8215e9 /cmd/rootlessport
parentd97f4dfbcc5af69c01afa2a76194486d178f63a6 (diff)
downloadpodman-f87f6d2fc193c9b53ac8ba634954a811a32fd057.tar.gz
podman-f87f6d2fc193c9b53ac8ba634954a811a32fd057.tar.bz2
podman-f87f6d2fc193c9b53ac8ba634954a811a32fd057.zip
Improved Windows compatibility
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
Diffstat (limited to 'cmd/rootlessport')
-rw-r--r--cmd/rootlessport/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/rootlessport/main.go b/cmd/rootlessport/main.go
index 5410cd14a..d8d6ffcee 100644
--- a/cmd/rootlessport/main.go
+++ b/cmd/rootlessport/main.go
@@ -225,7 +225,7 @@ outer:
// https://github.com/containers/podman/issues/11248
// Copy /dev/null to stdout and stderr to prevent SIGPIPE errors
- if f, err := os.OpenFile("/dev/null", os.O_WRONLY, 0755); err == nil {
+ if f, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0755); err == nil {
unix.Dup2(int(f.Fd()), 1) //nolint:errcheck
unix.Dup2(int(f.Fd()), 2) //nolint:errcheck
f.Close()