# child_process: Add write access to the null handle · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/41bf816fa6dd6fde0264db885c2f00757aba74b0)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 41bf816fa6dd6fde0264db885c2f00757aba74b0

Requested commit: 41bf816fa6dd6fde0264db885c2f00757aba74b0

Commit: 41bf816fa6dd6fde0264db885c2f00757aba74b0

Tree: 5aaa7a0fa8e8849db31f4f2f065e5f6d06581ff3

Author: xEgoist

Committer: Andrew Kelley

## Message

```
child_process: Add write access to the null handle

This commit allows write access to the `\\Device\\Null` Handle.
Without a write access, it's not possible for the child process to write
SdOut to Null. As a requirement `SetHandleInformation` was also changed
to mark the handle as iheritable (by adding it to Flags) by the spawned process.
This allows the child to access the NUL device that was opened.

This also makes the Windows part to behave similarly to `spawnPosix`.

```

## Parents

- [7116b02210bcae7bafac9017a7e47a14b52eafc2](https://git.cafe/gitcafe/zig/commit/7116b02210bcae7bafac9017a7e47a14b52eafc2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/41bf816fa6dd6fde0264db885c2f00757aba74b0?format=markdown)
