diff --git a/j/process.j b/j/process.j index 1369c0d6444c0..b674786c9c893 100644 --- a/j/process.j +++ b/j/process.j @@ -143,7 +143,7 @@ type Cmd function Cmd(exec::Executable) this = new(exec, HashTable{FileDes,PipeEnd}(), - Set(Cmd), + Set{Cmd}(), 0, ProcessNotRun()) add(this.pipeline, this) @@ -182,7 +182,7 @@ end fd(cmd::Cmd, f::FileDes) = Port(cmd,f) function fd(cmds::Set{Cmd}, f::FileDes) - set = Set(Port) + set = Set{Port}() for cmd = cmds if !has(cmd.pipes, f) add(set, fd(cmd,f)) @@ -204,7 +204,7 @@ stderr(cmds::Cmds) = fd(cmds,STDERR) cmds(port::Port) = set(port.cmd) function cmds(ports::Ports) - c = Set(Cmd) + c = Set{Cmd}() for port = ports add(c, port.cmd) end @@ -214,7 +214,7 @@ end ## building connected and disconnected pipelines ## function (&)(cmds::Cmds...) - set = Set(Cmd) + set = Set{Cmd}() for cmd = cmds add(set, cmd) end @@ -222,7 +222,7 @@ function (&)(cmds::Cmds...) end function (&)(ports::Ports...) - set = Set(Port) + set = Set{Port}() for port = ports add(set, port) end @@ -250,7 +250,7 @@ end function join(cmds::Cmds) if length(cmds) > 1 - pipeline = Set(Cmd) + pipeline = Set{Cmd}() for cmd = cmds add(pipeline, cmd.pipeline) end @@ -301,7 +301,7 @@ running(cmd::Cmd) = (cmd.pid > 0) # spawn(cmd) starts all processes connected to cmd function spawn(cmd::Cmd) - fds = Set(FileDes) + fds = Set{FileDes}() for c = cmd.pipeline if running(c) error("already running: ", c)