stdin redirection help...
- From: John Coppens <john jcoppens com>
 
- To: gtk-app-devel-list gnome org
 
- Subject: stdin redirection help...
 
- Date: Tue, 23 Aug 2005 17:07:06 -0300
 
Hello all.
I'm trying to run SPICE from inside a GTK program. I've redirected stdin,
stdout and stderr via pipes. The problem I have is with stdin:
How can I tell spice to stop asking for input till I want to send some
more? I read up some about directing the input to /dev/null, which would
provide an EOF situation. I tried to assign this file to the pipe,
without success:
  nll = open("/dev/null", O_RDONLY);
  dup2(nll, std_in[1]);
where std_in[1] is the write port of the pipe.
I always get 100% cpu occupation... Can someone indicate what to do here?
TIA,
John
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]