Open
Description
Currently, setting preSpawnProcessConfigurator
requires pre-fork on Linux, meaning preSpawnProcessConfigurator
can't be used to control the posix_spawn path.
On Linux, the signature is:
public var preSpawnProcessConfigurator: (@convention(c) @Sendable () -> Void)? = nil
Could it instead become:
public enum SpawnStrategy {
case posixSpawn(_ attr: posix_spawnattr_t?, _ fileactions: posix_spawn_file_actions_t?)
case forkExec
}
public var preSpawnProcessConfigurator: (@convention(c) @Sendable (inout SpawnStrategy) -> Void)? = nil
...and then the configurator could be called for both the posix_spawn and fork/exec paths, without influencing which one is taken.
Bonus points if this could be applied to Darwin as well (removing the forkExec option), to make the PlatformOptions API interface a little more similar.