Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open('less'... example in manual broken #12829

Closed
BobPortmann opened this issue Aug 27, 2015 · 1 comment
Closed

open('less'... example in manual broken #12829

BobPortmann opened this issue Aug 27, 2015 · 1 comment
Labels
io Involving the I/O subsystem: libuv, read, write, etc. regression Regression in behavior compared to a previous version

Comments

@BobPortmann
Copy link
Contributor

The example given in the manual to write to an external command is broken on master:

> ~/src/julia/julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.4.0-dev+7036 (2015-08-27 14:47 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 006537f* (0 days old master)
|__/                   |  x86_64-apple-darwin13.4.0

julia> versioninfo()
Julia Version 0.4.0-dev+7036
Commit 006537f* (2015-08-27 14:47 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM)2 Duo CPU     T9550  @ 2.66GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Penryn)
  LAPACK: libopenblas
  LIBM: libopenlibm
  LLVM: libLLVM-3.3

julia> open(`less`, "w", STDOUT) do io
           for i = 1:3
               println(io, i)
           end
       end
ERROR: ArgumentError: stream is closed or unusable
 in check_open at stream.jl:322
 in uv_write at stream.jl:924
 in buffer_or_write at stream.jl:952
 in write at stream.jl:992
 in print at strings/io.jl:5
 in print at strings/io.jl:6
 in println at strings/io.jl:8
 in println at stream.jl:238
 in println at stream.jl:554
 in anonymous at none:3
 in open at process.jl:487

julia> 

It seems to have been broken by

80be43723b485edee7539ec6e9a8111384335f31 
Author: Jameson Nash <[email protected]>
Date:   Thu Aug 20 23:54:05 2015 -0400

redesign Process to be a subtype of IO and dispatch read/write to the appropriate stdin/stdout stream
@stevengj
Copy link
Member

cc @vtjnash on 80be437

@stevengj stevengj added the io Involving the I/O subsystem: libuv, read, write, etc. label Aug 27, 2015
@JeffBezanson JeffBezanson added the regression Regression in behavior compared to a previous version label Aug 29, 2015
@vtjnash vtjnash closed this as completed in 462fd6e Sep 1, 2015
JeffBezanson added a commit that referenced this issue Sep 1, 2015
vtjnash added a commit that referenced this issue Sep 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
io Involving the I/O subsystem: libuv, read, write, etc. regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

3 participants