Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add process_type to service DSL #12019

Merged
merged 1 commit into from Sep 11, 2021
Merged

Add process_type to service DSL #12019

merged 1 commit into from Sep 11, 2021

Conversation

valrus
Copy link

@valrus valrus commented Sep 10, 2021

This enables services to be run with the "Interactive" ProcessType value; in particular, this avoids performance issues such as skipping when playing music in mpd. See this previous PR, which added ProcessType for the old plist method:
Homebrew/homebrew-core#19410

The ProcessType plist key was lost in the conversion to the service DSL,
so this is just reinstating it:
Homebrew/homebrew-core@483ad1f

I was experiencing music skipping in mpd and confirmed that adding the "Interactive" ProcessType in a custom plist resolved it.

The possible values are as described in the launchd manpage. I didn't see any analogous options for systemd so there it's a no-op.

If and when this is merged I can submit a second PR to use it for the mpd formula.


This enables mpd to be run with the "Interactive" value, which avoids
performance issues such as skipping when playing music. See this PR,
where this was done previously:
Homebrew/homebrew-core#19410

The ProcessType plist key was lost in the conversion to the service DSL:
Homebrew/homebrew-core@483ad1f
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

I don't know enough about systemd but given Sean's approval I think this is good to merge. Thanks so much for your first Homebrew contribution, @valrus!


Not specific to this PR but is it intentional that calling .service.keep_alive (and .working_dir, .process_type, and all of those) return nil? I'd expect them to return the value they've been set to (that's probably a question for @SMillerDev)

@Rylan12 Rylan12 merged commit bf95782 into Homebrew:master Sep 11, 2021
@valrus valrus deleted the services-plist-add-process-type branch September 11, 2021 04:18
@github-actions github-actions bot added the outdated PR was locked due to age label Oct 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants