[openbeos] Re: odd code in expander

  • From: Alan Westbrook <alan@xxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Tue, 20 Apr 2004 00:07:00 -0700

Ah, so threads spawned from that thread? Interesting.

=)

Alan

Korli wrote:

hi Alan

Alan Westbrook wrote:

1) using get_thread_info to see if the thread is ok is susceptable to race conditions.

i agree this call is not very useful

2) What is the purpose of gettign the thread name?


idem, this code is copy pasted from ZipOMatic :) but we don't test the thread name any more.
It could be optimized, yes. Thanks for noticing.


3) Why is the signal being sent to the negative of the thread id?

The signal should be sent not only to the thread with this id, but to its child threads too. The thread is being put in a process group when created so that child threads are with it. When sending a signal with a negative of the id, it is sent to the group. It is useful for tar | gz commands for example.

Jerome





Other related posts: