does gdk_input_add work at all?



Once upon a time I got gdk_input_add to work with sockets, but now as I try
to make it work with a normal file descriptor, it crashes. The code is
something like this,

  int fd;

  fd = open ("/somepath/somefile.txt", O_RDONLY);
  gdk_input_add (fd, GDK_INPUT_READ, "input_callback", NULL);

  gtk_main();
  close (fd);

It seems like it crashes right after the system realizes that there is data
to read in the fd and doesn't even reach the input_callback, so there can't
be problem with that.

-- 
Tommi Leino
namhas@netmill.fi http://majik.netti.fi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]