[Mono-list] using pipes with mono

raduM radu_marg at yahoo.com
Sat Aug 8 08:14:58 EDT 2009


I am trying to use unamed pipes to communicate between a gui written with
GTK# and a C program. I run the following on the C# side:

int [] pipe_fds = new int[2];
Syscall.pipe (pipe_fds);
string arguments = pipe_fds[0] + "-" + pipe_fds[1]
Process.Start("myexe", arguments);

And than on the C side:

int pipe_fds[2] = {0, 0};
// .. parse argv, get file descriptors
FILE* pipe_stream = 0;
pipe_stream = fdopen (pipe_fds[1], "w");

The moment the last line is executed, my program crashes. In the debugger,
mdb shows:
Thread @1 received signal 15 at #0

I do not understand what am I doing wrong? 
Thank you, Radu
-- 
View this message in context: http://www.nabble.com/using-pipes-with-mono-tp24877661p24877661.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list