Skip to content

please add a "getPid :: ProcessHandle -> IO (Maybe Int)" #108

Description

@sternmull

At the moment there is no way to get the PID of the subprocess. This can be very useful for logging or to use external commands to interact with a process.

This would be the equivalent of https://docs.python.org/3/library/subprocess.html#subprocess.Popen.pid

Activity

  1. snoyberg commented on Nov 14, 2017

    @snoyberg
    Collaborator

    I'm not opposed to such an addition, though the caveats that go along with it—specifically that the process may have died since the PID was acquired—need to be spelled out in the docs.

    I'm not familiar enough with the Windows side of things to know if this has a natural implementation there, do you have any insight?

    Finally, are you interested in writing a PR for this?

  2. EpicOrange commented on Oct 16, 2021

    @EpicOrange

    Seems like this can be closed!

  3. snoyberg commented on Oct 16, 2021

    @snoyberg
    Collaborator

    Thanks for pinging! 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

    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