This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: linux threads, the manager.


On Tue, 30 Oct 2001, Monserrat Seisdedos Nuņez wrote:

> i have a multithread process under Linux
> i expect every thread in the group to be terminated if i kill one of them.

However, that is just not how things work in Linux, so your
expectation won't be met.

Moreover, there isn't any UNIX or POSIX document which requires the
behavior that you expect.

> 	PID		PPID		CMD
> 	15744		15509		thr_kill
> 	15745		15744		thr_kill
> 	15746		15745		thr_kill
> 	15747		15745		thr_kill	
> 	15748		15745		thr_kill
> 
> If i kill 15745, i expect every threads to terminate but the result is:

On other systems, you can't even see threads as individual processes
with ps, so you aren't even supposed to be able to do this. It's a
feature of Linux that you can even see threads this way.

> Is any way to avoid it or maybe it is a bug??

If you stick a fork into a toaster, you might get hurt. That is
not a bug in the toaster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]