Skip to content

Commit aa8cd2e

Browse files
committed
Merge pull request #12739 from JuliaLang/jn/processpipe_cleanup
process and pipe cleanup
2 parents c7809f8 + 8ffdfc2 commit aa8cd2e

15 files changed

+407
-288
lines changed

base/deprecated.jl

+11-10
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,17 @@ const MemoryError = OutOfMemoryError
207207
#9295
208208
@deprecate push!(t::Associative, key, v) setindex!(t, v, key)
209209

210-
@deprecate (|>)(src::AbstractCmd, dest::AbstractCmd) pipe(src, dest)
211-
@deprecate (.>)(src::AbstractCmd, dest::AbstractCmd) pipe(src, stderr=dest)
212-
@deprecate (|>)(src::Redirectable, dest::AbstractCmd) pipe(src, dest)
213-
@deprecate (|>)(src::AbstractCmd, dest::Redirectable) pipe(src, dest)
214-
@deprecate (.>)(src::AbstractCmd, dest::Redirectable) pipe(src, stderr=dest)
215-
@deprecate (|>)(src::AbstractCmd, dest::AbstractString) pipe(src, dest)
216-
@deprecate (|>)(src::AbstractString, dest::AbstractCmd) pipe(src, dest)
217-
@deprecate (.>)(src::AbstractCmd, dest::AbstractString) pipe(src, stderr=dest)
218-
@deprecate (>>)(src::AbstractCmd, dest::AbstractString) pipe(src, stdout=dest, append=true)
219-
@deprecate (.>>)(src::AbstractCmd, dest::AbstractString) pipe(src, stderr=dest, append=true)
210+
@deprecate (|>)(src::AbstractCmd, dest::AbstractCmd) pipeline(src, dest)
211+
@deprecate (.>)(src::AbstractCmd, dest::AbstractCmd) pipeline(src, stderr=dest)
212+
@deprecate (|>)(src::Redirectable, dest::AbstractCmd) pipeline(src, dest)
213+
@deprecate (|>)(src::AbstractCmd, dest::Redirectable) pipeline(src, dest)
214+
@deprecate (.>)(src::AbstractCmd, dest::Redirectable) pipeline(src, stderr=dest)
215+
@deprecate (|>)(src::AbstractCmd, dest::AbstractString) pipeline(src, dest)
216+
@deprecate (|>)(src::AbstractString, dest::AbstractCmd) pipeline(src, dest)
217+
@deprecate (.>)(src::AbstractCmd, dest::AbstractString) pipeline(src, stderr=dest)
218+
@deprecate (>>)(src::AbstractCmd, dest::AbstractString) pipeline(src, stdout=dest, append=true)
219+
@deprecate (.>>)(src::AbstractCmd, dest::AbstractString) pipeline(src, stderr=dest, append=true)
220+
@deprecate pipe pipeline
220221

221222
# 10314
222223
@deprecate filter!(r::Regex, d::Dict) filter!((k,v)->ismatch(r,k), d)

base/docs/helpdb.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -2621,9 +2621,9 @@ doc"""
26212621
26222622
Connect to the host `host` on port `port`
26232623
2624-
connect(path) -> Pipe
2624+
connect(path) -> PipeEndpoint
26252625
2626-
Connect to the Named Pipe/Domain Socket at `path`
2626+
Connect to the Named Pipe / Domain Socket at ``path``
26272627
26282628
connect(manager::FooManager, pid::Int, config::WorkerConfig) -> (instrm::AsyncStream, outstrm::AsyncStream)
26292629
@@ -9396,7 +9396,7 @@ Listen on port on the address specified by `addr`. By default this listens on lo
93969396
93979397
listen(path) -> PipeServer
93989398
9399-
Listens on/Creates a Named Pipe/Domain Socket
9399+
Create and listen on a Named Pipe / Domain Socket
94009400
"""
94019401
listen
94029402

base/exports.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,8 @@ export
11611161
nb_available,
11621162
ntoh,
11631163
open,
1164-
pipe,
1164+
pipeline,
1165+
Pipe,
11651166
PipeBuffer,
11661167
poll_fd,
11671168
poll_file,

base/interactiveutil.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ end
8787
global _clipboardcmd
8888
_clipboardcmd !== nothing && return _clipboardcmd
8989
for cmd in (:xclip, :xsel)
90-
success(pipe(`which $cmd`, DevNull)) && return _clipboardcmd = cmd
90+
success(pipeline(`which $cmd`, DevNull)) && return _clipboardcmd = cmd
9191
end
9292
error("no clipboard command found, please install xsel or xclip")
9393
end
@@ -165,7 +165,7 @@ function versioninfo(io::IO=STDOUT, verbose::Bool=false)
165165
println(io, " WORD_SIZE: ", Sys.WORD_SIZE)
166166
if verbose
167167
lsb = ""
168-
@linux_only try lsb = readchomp(pipe(`lsb_release -ds`, stderr=DevNull)) end
168+
@linux_only try lsb = readchomp(pipeline(`lsb_release -ds`, stderr=DevNull)) end
169169
@windows_only try lsb = strip(readall(`$(ENV["COMSPEC"]) /c ver`)) end
170170
if lsb != ""
171171
println(io, " ", lsb)
@@ -343,7 +343,7 @@ downloadcmd = nothing
343343
global downloadcmd
344344
if downloadcmd === nothing
345345
for checkcmd in (:curl, :wget, :fetch)
346-
if success(pipe(`which $checkcmd`, DevNull))
346+
if success(pipeline(`which $checkcmd`, DevNull))
347347
downloadcmd = checkcmd
348348
break
349349
end

base/multi.jl

-1
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,6 @@ end
10321032
# The master process uses this to connect to the worker and subsequently
10331033
# setup a all-to-all network.
10341034
function read_worker_host_port(io::IO)
1035-
io.line_buffered = true
10361035
while true
10371036
conninfo = readline(io)
10381037
bind_addr, port = parse_connection_info(conninfo)

base/pkg/entry.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function add(pkg::AbstractString, vers::VersionSet)
5555
outdated = :yes
5656
else
5757
try
58-
run(pipe(Git.cmd(`fetch -q --all`, dir="METADATA"),stdout=DevNull,stderr=DevNull))
58+
run(pipeline(Git.cmd(`fetch -q --all`, dir="METADATA"),stdout=DevNull,stderr=DevNull))
5959
outdated = Git.success(`diff --quiet origin/$branch`, dir="METADATA") ?
6060
(:no) : (:yes)
6161
end

base/pkg/generate.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ github_user() = readchomp(ignorestatus(`git config --global --get github.user`))
1111
function git_contributors(dir::AbstractString, n::Int=typemax(Int))
1212
contrib = Dict()
1313
tty = @windows? "CON:" : "/dev/tty"
14-
for line in eachline(pipe(tty, Git.cmd(`shortlog -nes`, dir=dir)))
14+
for line in eachline(pipeline(tty, Git.cmd(`shortlog -nes`, dir=dir)))
1515
m = match(r"\s*(\d+)\s+(.+?)\s+\<(.+?)\>\s*$", line)
1616
m === nothing && continue
1717
commits, name, email = m.captures

base/pkg/git.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function git(d)
2121
end
2222

2323
cmd(args::Cmd; dir="") = `$(git(dir)) $args`
24-
run(args::Cmd; dir="", out=STDOUT) = Base.run(pipe(cmd(args,dir=dir), out))
24+
run(args::Cmd; dir="", out=STDOUT) = Base.run(pipeline(cmd(args,dir=dir), out))
2525
readall(args::Cmd; dir="") = Base.readall(cmd(args,dir=dir))
2626
readchomp(args::Cmd; dir="") = Base.readchomp(cmd(args,dir=dir))
2727

0 commit comments

Comments
 (0)