I'd rather not use stdio to let it know.
That seems like a better option. Or use some other IPC mechanism to get the port number back to A, like writing it to a file.
Yeah, unfortunately I cannot use stdio in this particular case. I ended up talking over a FIFO, created with mkfifo(2). Ideally I'd use Pipe() but the file descriptors doesn't seem to be inherited by the child process that is spawned with Process(). I'd assume it would be possible if I used posix_spawn and friends but I'd prefer to stay with the higher-level APIs, if possible. Am I missing something?
Topic:
Programming Languages
SubTopic:
Swift
Tags: