Hi,
I want to be able to communicate with a C program while maintaining stdio streams as-is - sort of like the way NodeJS can send messages to child nodejs programs.
I can see in the documentation - i can use something like :
spawn('prg', [], { stdio: ['pipe', 'pipe', 'pipe', 'pipe' /* extra one here */] });
But - what do i need to do on the C side to link back to that new pipe ?
Do I need 2 pipes (one for read, one for write)
Am I better trying to do something with IPC ?
Any ideas, and/or code samples would be greatly appreciated !