It's paranoid code.  The code that really executes is the case that uses lis_down_nosig(&wakeup_sem).  If we are closing a queue without a corresponding head structure then something is wrong.  The code could just detect that earlier, write a message, and leave the queue dangling, but instead it tries to get the queue cleaned up.  And, yes, it would be vulnerable to signals.

-- Dave

At 10:04 PM 6/1/2004, Eugene LiS User wrote:
Hi,

In lis_qdetach() the following code seems a bit questionable:

while (   ((rq->q_flag | wq->q_flag) & (QENAB | QSCAN | QRUNNING))
       && rslt == 0                                              
      )                                                          
{
....
rslt = lis_down(&wakeup_sem) ;
...
}

If lis_down() is interrupted by a signal, i.e. rslt = -EINTR;
then we will get out of the loop even though QRUNNING flag is still there.

Am I missing something?

--
Eugene



__________________________________________________________________
Introducing the New Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp
_______________________________________________
Linux-streams mailing list
[EMAIL PROTECTED]
http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams

Reply via email to