# New behavior of open(command)

**URL:** <https://discourse.julialang.org/t/new-behavior-of-open-command/12191>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [July 5, 2018, 5:56pm UTC](https://discourse.julialang.org/t/new-behavior-of-open-command/12191 "2018-07-05T17:56:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_McBane](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sean_mcbane/32/4580_2.png) [@Sean\_McBane](https://discourse.julialang.org/u/Sean_McBane)\
**Post date:** [July 5, 2018, 5:56pm UTC](https://discourse.julialang.org/t/new-behavior-of-open-command/12191/1 "2018-07-05T17:56:56Z")

</div>

Hi all, I’m upgrading ClusterManagers.jl to be 0.7-ready, and the last deprecation warning I’m finding is in the launch method for a LocalAffinityManager. Line 37 in affinity.jl has `io, pobj = open(detach(...), "r")`. This elicits a deprecation warning “open(cmd) now returns only a `Process<:IO` object”.

However, the documentation of this `open` method gives the signature `open(command, stdio=devnull; write::Bool = false, read::Bool = !write)` and still says that it returns a tuple `(stream, process)`, contradicting the deprecation warning. Further confusing matters, in the source of the Distributed package in managers.jl we have `open` invoked as `io = open(detach(setenv(cmd, dir=dir)), "r+")`, which matches the return type in the docs but _not_ the signature.

So, my question is, what is the new correct way to write this code? I assume that I should only take one return from `open`, but which is the correct signature to use?

Edit: Also, should the `io` field of a `WorkerConfig` in general be the `out` field of a `Process`? I’m not sure what exactly is expected behavior.
