lkml.org 
[lkml]   [2008]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: recv() hangs until SIGCHLD ?
David Schwartz, le Fri 10 Oct 2008 21:48:45 -0700, a écrit :
> > We are using the Boehm GC which uses the signals SIGXCPU and SIGPWR to
> > pause+restart the threads when running a GC cycle.
> > [...]
> >
> > However, when attaching GDB to our locked thread it seems that even
> > when the GC runs, recv() does not exit (the breakpoint after it is not
> > reached).
>
> But you've yet to explain why it should return. Was it interrupted by
> a signal?

See quote above.

> Was data received?

No

> Is the socket non-blocking?

No

> Why isn't this expected behavior? Blocking sockets block, full stop.

But using a signal is a common technique to have it getting unblocked,
since SUS says

« [EINTR] The recv() function was interrupted by a signal that was
caught, before any data was available. »

Samuel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-10-11 11:59    [W:0.394 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site