# incr-check: Kill child process on error · gitcafe/zig

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

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

Visibility: public

Requested revision: 5358af7ba4cf16bef1734729646b99842e439916

Requested commit: 5358af7ba4cf16bef1734729646b99842e439916

Commit: 5358af7ba4cf16bef1734729646b99842e439916

Tree: 53692a8d90341f2a2e3d842875d3f0f7dc822e33

Author: Ryan Liptak

Committer: GitHub

## Message

```
incr-check: Kill child process on error

Since the child process is spawned with the tmp directory as its CWD, the child process opens it without DELETE access. On error, the child process would still be alive while the tmp directory is attempting to be deleted, so it would fail with `.SHARING_VIOLATION => return error.FileBusy`.

Fixes arguably the least important part of #22510, since it's only the directory itself that would fail to get deleted, all the files inside would get deleted just fine.
```

## Parents

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

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