From: "Filipau, Ihar" <ifilipau@sussdd.de>
To: "'Kevin Curtis'" <kevin.curtis@farsite.co.uk>,
"'bert hubert'" <ahu@ds9a.nl>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: RE: read() & close()
Date: Fri, 21 Mar 2003 09:07:38 +0100 [thread overview]
Message-ID: <7A5D4FEED80CD61192F2001083FC1CF906513A@CHARLY> (raw)
Thanks for replies.
Mea culpa. Partially ;-)
1. first problem - sockets. I will check shutdown() - but
I am doing shutdown(). This is listen() socket.
Or I was caught with SO_LINGER again... I will check
this again.
2. buggy driver from second party company has no wake_up
in release code. In turn I have copied part of /generic/
code from this driver - so I had same troubles.
I have just checked the (reference for me) pipe/fifo
implementations - they do wake_up in release.
Thanks for the help.
P.S. Actually I have managed to press my management and they
agreed on shift to single-threaded design. So I hope this
will be not a problem any more at all.
>
>
> Hi,
> I have come across this problem when implementing a
> sockets interface to our X.25 card. On the thread that wants
> to close the socket, it must first issue a shutdown(). This
> will unblock the read() or poll(). And then you can do the close().
>
>
> Kevin
>
> -----Original Message-----
> From: bert hubert [mailto:ahu@ds9a.nl]
> Sent: 20 March 2003 15:08
> To: Filipau, Ihar
> Cc: 'linux-kernel@vger.kernel.org'
> Subject: Re: read() & close()
>
>
> On Thu, Mar 20, 2003 at 03:14:52PM +0100, Filipau, Ihar wrote:
>
> > I have/had a simple issue with multi-threaded programs:
> >
> > one thread is doing blocking read(fd) or poll({fd}) on
> > file/socket.
>
> You can't do poll on a file, it won't tell you anything
> useful, so I assume you mean a socket.
>
> > another thread is doing close(fd).
> >
> > I expected first thread will unblock with some kind
> > of error - but nope! It is blocked!
>
> Can you show code with this problem?
>
> Regards,
>
> bert
>
> --
> http://www.PowerDNS.com Open source, database driven DNS
> Software
> http://lartc.org Linux Advanced Routing & Traffic
> Control HOWTO
> http://netherlabs.nl Consulting
> -
> 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/
next reply other threads:[~2003-03-21 7:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-21 8:07 Filipau, Ihar [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-21 13:07 Filipau, Ihar
2003-03-20 16:09 Kevin Curtis
2003-03-20 14:14 Filipau, Ihar
2003-03-20 15:08 ` bert hubert
2003-03-21 12:35 ` David Schwartz
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=7A5D4FEED80CD61192F2001083FC1CF906513A@CHARLY \
--to=ifilipau@sussdd.de \
--cc=ahu@ds9a.nl \
--cc=kevin.curtis@farsite.co.uk \
--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®