镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

[Converge] lib: fix stdio/ipc sync i/o regression #34

Closed

Description

@jasnell

See nodejs/node-v0.x-archive@2411bea
/cc: @bnoordhuis @trevnorris

Original commit message:

process.send() should be synchronous, it should block until the message
has been sent in full, but it wasn't after the second-to-last libuv
upgrade because of commit libuv/libuv@393c1c5 ("unix: set non-block
mode in uv_{pipe,tcp,udp}_open"), which made its way into io.js in
commit 07bd05b ("deps: update libuv to 1.2.1").

Commit libuv/libuv@b36d4ff ("unix: implement uv_stream_set_blocking()")
as landed in io.js in commit 9681fca ("deps: update libuv to 1.4.0")
makes it possible to restore the synchronous behavior again and that's
precisely what this commit does.

The same line of reasoning applies to `net.Socket({ fd: 1 })`: creating
a socket object from a stdio file descriptor, like the `process.stdout`
getter does, should put the file descriptor in blocking mode for
compatibility reasons.

Activity

  1. Fishrock123 commented on May 22, 2015

    @Fishrock123
    Contributor
  2. bnoordhuis commented on May 22, 2015

    @bnoordhuis
    Member

    Hah, that actually landed in joyent/node? Like I said in the other issue, I think it's better to embrace the asynchronous nature of process.send(). Now at least its behavior is consistent on Windows and UNIX.

  3. jasnell commented on May 27, 2015

    @jasnell
    MemberAuthor

    Ok, so what do we want to do with this one then? It looks to me like landing this in node was likely premature given the additional discussion on the io.js side. This would mean a change of behavior from v0.12 to the first converged release so we'll need to document it.

  4. Fishrock123 commented on Jun 6, 2015

    @Fishrock123
    Contributor

    I suggest we use the major for this as a breaking change and document it.

  5. jasnell commented on Jul 9, 2015

    @jasnell
    MemberAuthor

    @Fishrock123 ... Ok, then I think this is added to the list of breaking changes from v0.12 to the converged release. /cc @misterdjules

    I'm not sure if I quite understand the change enough myself to document it, however.

  6. rvagg commented on Aug 24, 2015

    @rvagg
    Member

    Moving discussion back to nodejs/node#760

    tbh I don't really know where this stands, if we make it officially async do we have to change the non-windows implementations? we'd need to change the docs too I suppose. It would be great to get rid of the Known Issues item for this.

  7. brendanashworth commented on Sep 15, 2015

    @brendanashworth
    Contributor

    This became async in nodejs/node@56d9584, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions