Bug 106249

Summary: Change timeout option to match usage
Product: GeoClue Reporter: Bastien Nocera <bugzilla>
Component: serviceAssignee: Geoclue Bugs <geoclue-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: bugzilla
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Move default timeout to main binary

Description Bastien Nocera 2018-04-26 09:15:55 UTC
I was looking at why geoclue was started 3 times in the space of 30 seconds in bug 106236.

>         &inactivity_timeout,
>         N_("Exit after T seconds of inactivity. Default: 0 (never)"),

> ExecStart=@libexecdir@/geoclue -t 5

Would be nice to change this so the default option in the binary is the one actually used.
Comment 1 Zeeshan Ali 2018-04-26 10:15:51 UTC
(In reply to Bastien Nocera from comment #0)
> I was looking at why geoclue was started 3 times in the space of 30 seconds
> in bug 106236.
> 
> >         &inactivity_timeout,
> >         N_("Exit after T seconds of inactivity. Default: 0 (never)"),
> 
> > ExecStart=@libexecdir@/geoclue -t 5
> 
> Would be nice to change this so the default option in the binary is the one
> actually used.

This is on purpose. The usecase of launching the binary is different than service autolaunch. If you launch the binary manually, you don't want it to timeout on you and close it yourself. When it get's launched automatically, on demand, you want the service to go away after some time of no-one using it.

Maybe we want a bigger timeout but we definetely want the timeout for the service.
Comment 2 Bastien Nocera 2018-04-26 10:24:44 UTC
(In reply to Zeeshan Ali from comment #1)
> (In reply to Bastien Nocera from comment #0)
> > I was looking at why geoclue was started 3 times in the space of 30 seconds
> > in bug 106236.
> > 
> > >         &inactivity_timeout,
> > >         N_("Exit after T seconds of inactivity. Default: 0 (never)"),
> > 
> > > ExecStart=@libexecdir@/geoclue -t 5
> > 
> > Would be nice to change this so the default option in the binary is the one
> > actually used.
> 
> This is on purpose. The usecase of launching the binary is different than
> service autolaunch. If you launch the binary manually, you don't want it to
> timeout on you and close it yourself. When it get's launched automatically,
> on demand, you want the service to go away after some time of no-one using
> it.
> 
> Maybe we want a bigger timeout but we definetely want the timeout for the
> service.

I would expect the "default: 0" in the help to match how geoclue is actually launched. The user that launches geoclue by hand probably wants it to behave like the daemon, not in a different way that wouldn't match the behaviour.
Comment 3 Bastien Nocera 2018-05-02 08:42:18 UTC
Created attachment 139261 [details] [review]
Move default timeout to main binary

Rather than have the default 5 seconds timeout in 2 separate locations,
move the default timeout value to the binary, so as to reduce the
difference between the interactive and non-interactive behaviour, and
reduce confusion.
Comment 4 Zeeshan Ali 2018-05-02 13:22:50 UTC
Comment on attachment 139261 [details] [review]
Move default timeout to main binary

Review of attachment 139261 [details] [review]:
-----------------------------------------------------------------

ack
Comment 5 Bastien Nocera 2018-05-02 17:57:42 UTC
Attachment 139261 [details] pushed as 72d8008 - Move default timeout to main binary

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.