Skip to content

pass fn item pointers? #33

@cgwalters

Description

@cgwalters

I am working on some code for testing an external binary, and it's useful if every test runs in a temporary directory as a subprocess so that . is a tempdir.

I wrote
https://github.com/cgwalters/with-procspawn-tempdir/
but realized that it'd be simpler if I had my test framework allocate the tempdir outside of the test. So I tried to send across the test function pointer fn() -> Result<()> across procspawn::spawn but of course it's not serializable.

But this library is effectively doing that "fn pointer" serialization for the function provided to spawn; could we make the MarshalledCall bits a public API like: procspawn::ThisProcessFn that was serializable with serde?

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