From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Szymon Janc <szymon.janc@codecoup.pl>
Cc: John Klug <ski.brimson@gmail.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Subject: Re: Profile1 close question
Date: Thu, 14 Dec 2017 14:08:21 -0200 [thread overview]
Message-ID: <CABBYNZ+8h5Q7HCevDAxOAC7RUaOvY9qK1sM_NGNt5RzLXSahJA@mail.gmail.com> (raw)
In-Reply-To: <1530610.7dBsjPVAZJ@ix>
Hi John,
On Thu, Dec 14, 2017 at 1:35 PM, Szymon Janc <szymon.janc@codecoup.pl> wrote:
> Hi John,
>
> On Thursday, 14 December 2017 16:21:32 CET John Klug wrote:
>> What is holding the connection open is bluetoothd.
>>
>> After closing the file descriptor for RFCOMM, there are two file
>> descriptors in the Bluetooth daemon that are left:
>>
>> bluetooth 1406 root 18u sock 0,7 0t0 26587 protocol:
>> RFCOMM bluetooth 1406 root 19u sock 0,7 0t0 26602
>> protocol: RFCOMM
>>
>> By terminating the application these go away, but what if I wish to
>> keep the daemon running? How do I tell the Bluetooth daemon to close
>> the RFCOMM sockets?
>
> I think you need to shutdown() socket.
Yep, shutdown must be used since bluetoothd keeps a reference in case
it has to disconnect and to keep track of the service state. We should
perhaps document that we expect the user application to shutdown the
fd in case it want it to be disconnected.
--
Luiz Augusto von Dentz
prev parent reply other threads:[~2017-12-14 16:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 0:13 Profile1 close question John Klug
2017-12-14 15:21 ` John Klug
2017-12-14 15:35 ` Szymon Janc
2017-12-14 16:08 ` Luiz Augusto von Dentz [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=CABBYNZ+8h5Q7HCevDAxOAC7RUaOvY9qK1sM_NGNt5RzLXSahJA@mail.gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=ski.brimson@gmail.com \
--cc=szymon.janc@codecoup.pl \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.