From: Melkor Ainur <melkorainur@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: tcp_recvmsg and tcp_data_wait with respect to select
Date: Tue, 22 Jan 2002 13:47:10 -0800 (PST) [thread overview]
Message-ID: <20020122214710.41059.qmail@web21207.mail.yahoo.com> (raw)
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/
reply other threads:[~2002-01-22 21:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020122214710.41059.qmail@web21207.mail.yahoo.com \
--to=melkorainur@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®