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?
It can be done, but it's rather unnecessary. Pipes are intended for inter-process communication. Threads share the same memory and can therefore communicate directly, as long as you use locking correctly.