2023-07-20 17:42:35

by Dynastic Space

[permalink] [raw]
Subject: Daemonizing bluetoothd

I am reading through the bluetoothd code for version 5.56, but I
cannot find the call that makes it into a daemon. I don't see a fork
or a daemon call. How is it turned to one?
I am compiling the code on an OpenWRT system.

Thank you for your help


2023-07-20 18:22:32

by Dynastic Space

[permalink] [raw]
Subject: Re: Daemonizing bluetoothd

Thank you for your reply.
So you are saying that you are relying on whatever service manager to
daemonize the process? I am compiling for OpenWRT which uses procd,
not systemd.

On Thu, Jul 20, 2023 at 9:04 PM Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Hi,
>
> On Thu, Jul 20, 2023 at 10:42 AM Dynastic Space <[email protected]> wrote:
> >
> > I am reading through the bluetoothd code for version 5.56, but I
> > cannot find the call that makes it into a daemon. I don't see a fork
> > or a daemon call. How is it turned to one?
> > I am compiling the code on an OpenWRT system.
>
> We don't call fork anymore, since most likely bluetoothd would be run
> as a systemd service I don't think it matters though.
>
> --
> Luiz Augusto von Dentz

2023-07-20 18:42:55

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Daemonizing bluetoothd

Hi,

On Thu, Jul 20, 2023 at 10:42 AM Dynastic Space <[email protected]> wrote:
>
> I am reading through the bluetoothd code for version 5.56, but I
> cannot find the call that makes it into a daemon. I don't see a fork
> or a daemon call. How is it turned to one?
> I am compiling the code on an OpenWRT system.

We don't call fork anymore, since most likely bluetoothd would be run
as a systemd service I don't think it matters though.

--
Luiz Augusto von Dentz

2023-07-20 18:51:35

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Daemonizing bluetoothd

Hi,

Can't recall when we made the change to stop forking, but it has been
a while bluetoothd has this behavior, doesn't procd handle processes
that don't fork by themselves? How old is bluetoothd in OpenWRT that
this is only showing up now?

On Thu, Jul 20, 2023 at 11:15 AM Dynastic Space <[email protected]> wrote:
>
> Thank you for your reply.
> So you are saying that you are relying on whatever service manager to
> daemonize the process? I am compiling for OpenWRT which uses procd,
> not systemd.
>
> On Thu, Jul 20, 2023 at 9:04 PM Luiz Augusto von Dentz
> <[email protected]> wrote:
> >
> > Hi,
> >
> > On Thu, Jul 20, 2023 at 10:42 AM Dynastic Space <[email protected]> wrote:
> > >
> > > I am reading through the bluetoothd code for version 5.56, but I
> > > cannot find the call that makes it into a daemon. I don't see a fork
> > > or a daemon call. How is it turned to one?
> > > I am compiling the code on an OpenWRT system.
> >
> > We don't call fork anymore, since most likely bluetoothd would be run
> > as a systemd service I don't think it matters though.
> >
> > --
> > Luiz Augusto von Dentz



--
Luiz Augusto von Dentz

2023-07-20 19:04:30

by Dynastic Space

[permalink] [raw]
Subject: Re: Daemonizing bluetoothd

The bluez version that I am using is 5.56.
It's not that I had a problem: I just expected to see a daemon call,
and when I hadn't I was surprised. Then I started suspecting that
procd forks the process by itself, but I wasn't sure.
Your answer clarifies things for me. Thanks!

On Thu, Jul 20, 2023 at 9:33 PM Luiz Augusto von Dentz
<[email protected]> wrote:
>
> Hi,
>
> Can't recall when we made the change to stop forking, but it has been
> a while bluetoothd has this behavior, doesn't procd handle processes
> that don't fork by themselves? How old is bluetoothd in OpenWRT that
> this is only showing up now?
>
> On Thu, Jul 20, 2023 at 11:15 AM Dynastic Space <[email protected]> wrote:
> >
> > Thank you for your reply.
> > So you are saying that you are relying on whatever service manager to
> > daemonize the process? I am compiling for OpenWRT which uses procd,
> > not systemd.
> >
> > On Thu, Jul 20, 2023 at 9:04 PM Luiz Augusto von Dentz
> > <[email protected]> wrote:
> > >
> > > Hi,
> > >
> > > On Thu, Jul 20, 2023 at 10:42 AM Dynastic Space <[email protected]> wrote:
> > > >
> > > > I am reading through the bluetoothd code for version 5.56, but I
> > > > cannot find the call that makes it into a daemon. I don't see a fork
> > > > or a daemon call. How is it turned to one?
> > > > I am compiling the code on an OpenWRT system.
> > >
> > > We don't call fork anymore, since most likely bluetoothd would be run
> > > as a systemd service I don't think it matters though.
> > >
> > > --
> > > Luiz Augusto von Dentz
>
>
>
> --
> Luiz Augusto von Dentz