I filed issue to DTS, but got no replies. However seems like I found a workaround.
This issue is definitely in inodes: basically in case of 'File not found' macOS kills some other running process sharing the inode with the already removed file. There are no xattrs attached to this inode and so I was unable to find way to suppress checks or avoid kills. To me this behaviour still seems incorrect, but I cannot do anything with it.
Eventually I was able to avoid inode sharing in my build process by using clonefile(2) instead of hardlink. This has same spatial impact as hardlinking, but some extra performance impact: seems like OS processes like osqueryd, syspolicyd, XprotectService and JamfDaemon are more active with clonefile. This may be explained by their attempt to check each copy of a file I clone, while in case of hardlink they only check file once per inode.
Topic:
Code Signing
SubTopic:
General
Tags: