Skip to content

std::process should provide a facility to specify custom file descriptors to stdin/stdout/stderr #893

Closed

Description

@achernya

Currently, RFC #517 specifies that "The equivalent of today's InheritFd will be added at a later point.". However, this severely limits the utility of std::process. My current use case is writing a (toy) shell, without resorting to libc::*. Unfortunately, without support for setting custom file descriptors in std::process, it's not possible to implement features like file redirection or pipelines.

From my reading of libstd/process.rs and libstd/sys/${PLATFORM}/process2.rs, it looks like all of the platform-specific code for handling AnonPipe/FileDesc is already in place, and a small change to the API of process.rs would allow for setting custom AnonPipe.

I'm happy to work on a patch (assuming that I haven't missed any important details in my analysis regarding difficulty).

Activity

  1. l0kod commented on Feb 24, 2015

    @l0kod

    cc #899

  2. added a commit that references this issue on Mar 1, 2015
  3. arthurprs commented on Mar 3, 2015

    @arthurprs

    sub, I guess this should be also posted in rust repo

  4. alexcrichton commented on Mar 5, 2015

    @alexcrichton
    Member

    I'm going to close this in favor of #941 now that I've opened it, but thanks for the issue!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions