public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] select(2) or read(2) on bluetooth sockets not	working correctly?
Date: Mon, 26 Nov 2007 10:14:50 +0100	[thread overview]
Message-ID: <1196068490.4217.101.camel@aeonflux> (raw)
In-Reply-To: <a96155200711181327tce91b18w5bd842ee88611db4@mail.gmail.com>

Hi Pawel,

> I have put simple program demonstrating the problem at
> http://tfuj.pl/gnokii/bt.c with compilation hints and usage.
> The testing I did was on Ubuntu kernels, so that's for sure not the
> recent one, but I think it is really easy to reproduce if the problem
> still persists.

this from the select() manual page:

Those listed in readfds will be watched to see if characters  become
available  for reading  (more  precisely, to see if a read will not
block; in particular, a file descriptor is also ready on end-of-file)

If a device disconnects or gets out of range, it is considered to be an
end of file situation. It might help to also watch the exceptfds for the
hangup signal. The read() should return an error if the connection has
been terminated. So that part is strange.

It means that if you connect, then poweroff and then call read() you
would see the same effect. The read() command will block. Can you
confirm this?

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      reply	other threads:[~2007-11-26  9:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-15 14:15 [Bluez-devel] select(2) or read(2) on bluetooth sockets not working correctly? Pawel Kot
2007-11-15 18:00 ` Marcel Holtmann
2007-11-18 21:27 ` Pawel Kot
2007-11-26  9:14   ` Marcel Holtmann [this message]

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=1196068490.4217.101.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /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