mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* tcp_recvmsg and tcp_data_wait with respect to select
@ 2002-01-22 21:47 Melkor Ainur
  0 siblings, 0 replies; only message in thread
From: Melkor Ainur @ 2002-01-22 21:47 UTC (permalink / raw)
  To: linux-kernel

Hello all,

I have been writing a TCP stack. In my implementation
of tcp_recvmsg, I put the calling process to sleep
around my device's waitqueue by doing a 
interruptible_sleep_on(&mywaitq);
and then wake the caller on an interrupt.

This functionality works fine for an application that
calls recv() and expects to block. However, an
application like netcat/nc calls select on an input
filehandle (stdin i think) as well as the recv() 
handle. When this is done, and I put the caller to
sleep, recv works fine but the application is no
longer
woken out of select by standard input. This would
suggest that the way I put the caller to sleep is
different than the way linux's tcp_recvmsg does it.
Looking at the code, I see tcp_data_wait which does
approximately the same thing. I instrumented this
area with some debug and noticed that when running 
netcat this is not what is called. I will continue to
look for where tcp_recvmsg actually puts the caller 
to sleep. In the mean time, I am hoping for any
hints/suggestions that could help me solve this issue.

                                   Thanks,
                                   Melkor


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-22 21:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-22 21:47 tcp_recvmsg and tcp_data_wait with respect to select Melkor Ainur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®