I am trying to channel data via pipes whenever a signal arrives from a thread to the main process.
Is this possible? How can this be done?
If you're talking about pipe() rather than |, then yes. Pipes can generally just be treated as a file descriptor. You just need to open the pipe and cleanup the input in one thread, and the output in the other.
pipe()
|