Skip to content

Can this be really done without native C code? #39

@markusschaber

Description

@markusschaber

Hi,
first, I want to thank you for this nice project. However, it looks like it's not really maintained currently.

If it is, I have a question. From reading your code, you just use p/invoke for both the forkpty() and exec() calls. However, this issue comment here states that it's not really safe to use fork() and exec() from native code, as the forked process is in a rather weird state before exec() is called, which is likely to break managed code:

dotnet/runtime#12350 (comment)

So now my question: is that statement in that comment outdated in .NET 8 / .NET 10? (It's from 2019 after all.) Or if not, how do you ensure that the process does not run into these traps? Maybe we actually need native C code here?

Thanks and regards!

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