Skip to content

advanced functions for process / subprocess management #661

@refaktor

Description

@refaktor

From the lobste.rs thread:

As for subprocess management: The simple cases are: start a process, synchronously or asynchronously, but sync might suffice, if you can start a process in a go-routine. Be able to catch it's output or redirect it. Be able to merge the output streams (and redirect the merged stream), be able to provide input. So far for the basics. Then it gets harder: start a process asynchronously and be able to read out the streams while it runs, and to provide input base on the outputs. Most subporcessing libraries only offer the possibility to set the data that should be sent to stdin before the process is started, but not after starting it. Additionally, if you could do simple call chains like ls -la | wc -l and then catch the last output, that would be very nice too.

reference: https://lobste.rs/s/vw12iy/when_if_is_just_function#c_eyoih5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions