I have a code that looks like this:
uses this library
#include <unistd.h>
#define READ_FD 0
#define WRITE_FD 1
int m_pipe[2];
if(pipe(m_pipe) != -1) {
unsigned long Id = gdk_input_add(m_pipe[READ_FD], GDK_INPUT_READ, Callback, (gpointer)this);
}
and it surprisingly builds on both linux(all major flavors: AS3, AS5, solaris) and windows. However, it doesn't really work on windows at all.
How should a code using pipes be implemented so it works on both windows and linux?
Thanks