[Qt-interest] bash jobcontrol breaks QT4 and inotify ?

David Heremans david.heremans at intersoft-electronics.com
Fri Aug 13 15:09:41 CEST 2010


Hello,

I was trying to find a nice way to have my program react upon new files
that could pop-up in a given /var/spool directory. Since it runs on a
linux box  I thought about using inotify, and a quick Google got me to
this page:

http://wahjava.wordpress.com/2007/05/09/my-experiment-with-inotify-and-qt4/

I downloaded the small example inotify.tgz and it worked as a charm so I
decided to try to integrate the inotify.hh and inotify.cc into my
program, but it doesn't seem to work correctly, so I had to look at the
example again and (by accident) I found the following strange behavior.

If I launch the ./inotify_demo (from an xterm/konsole) and start
monitoring a directory it works nicely. But if a press CTRL-Z and bring
it back to the foreground (with the fg command) it simply stops reacting
to changes? Even pressing the stop/start button doesn't reactivate the
program.

Can somebody here explain me the impact of the CTRL-Z on the inotify
mechanism? Could it be that running my program in the debugger doesn't
work because of some unknown-to-me impact from signals (on  the threads?)

I'm running kubuntu lucid lynx (64 bit)
with qtcreator 1.3.1, based on qt 4.6.2(64 bit)

Thanks in advance,


David Heremans





More information about the Qt-interest-old mailing list