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

Thiago Macieira thiago at kde.org
Wed Aug 18 17:51:31 CEST 2010


On Tuesday 17 August 2010 10:35:05 Andreas Pakulat wrote:
> On 17.08.10 10:26:52, Arnold Krille wrote:
> > On Tuesday 17 August 2010 10:22:07 Andreas Pakulat wrote:
> > > > I'm still puzzled by this program going hay-wire after a 'Ctrl+Z;fg'
> > > > I found out the following extra info. I monitored the program with
> > > > htop so that I could se the threads and when I launch the program I
> > > > get 7577 david      20 0 249M 21456 1584 S 0.0 0.4 0:00.10
> > > > ./inotify_demo 7578 david      20 0 249M 21456 1584 S 0.0 0.4
> > > > 0:00.00 ./inotify_demo 7579 david      20 0 249M 21456 1584 S 0.0
> > > > 0.4 0:00.00 ./inotify_demo
> > > > 
> > > > which should be the main process and two threads
> > > 
> > > No, these are 3 separate instances of the same app. You cannot see the
> > > threads inside the process using htop.
> > 
> > Yes you can! Just take a look at the settings of htop. You can hide user
> > and kernel threads or show them. You can even show them in a different
> > color then the main process.
> > It doesn't yet show the thread-names you can use in newer glib but that
> > is probably a matter of time...
> 
> Ah, I wasn't aware that separate threads have their own pid's on linux.

They don't, not if you have any non-jurassic system.

The old implementation of LinuxThreads did have one PID per thread.

But NPTL, which is a proper POSIX Threads implementation, has one PID per 
process. Each thread has a thread ID and it's allocated from the same pool 
that PIDs are. But a call to getpid(2) returns only the master one.

Threads are not shown by default in ps(1) either. They are not in /proc.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100818/67792542/attachment.bin 


More information about the Qt-interest-old mailing list