Skip to content

Commit a3f3589

Browse files
avoid duplcation
1 parent 5ef8720 commit a3f3589

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

base/stream.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,14 +1263,8 @@ end
12631263
function (f::RedirectStdStream)(::DevNull)
12641264
nulldev = @static Sys.iswindows() ? "NUL" : "/dev/null"
12651265
handle = open(nulldev, write=f.writable)
1266-
_redirect_io_libc(handle, f.unix_fd)
1267-
c_sym = f.unix_fd == 0 ? cglobal(:jl_uv_stdin, Ptr{Cvoid}) :
1268-
f.unix_fd == 1 ? cglobal(:jl_uv_stdout, Ptr{Cvoid}) :
1269-
f.unix_fd == 2 ? cglobal(:jl_uv_stderr, Ptr{Cvoid}) :
1270-
C_NULL
1271-
c_sym == C_NULL || unsafe_store!(c_sym, handle.handle)
1266+
f(handle)
12721267
close(handle) # handle has been dup'ed in _redirect_io_libc
1273-
_redirect_io_global(devnull, f.unix_fd)
12741268
return devnull
12751269
end
12761270
function (f::RedirectStdStream)(io::AbstractPipe)

0 commit comments

Comments
 (0)