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

_z_precmd:1: nice(5) failed: operation not permitted #230

Closed
skywind3000 opened this issue Feb 1, 2018 · 3 comments
Closed

_z_precmd:1: nice(5) failed: operation not permitted #230

skywind3000 opened this issue Feb 1, 2018 · 3 comments

Comments

@skywind3000
Copy link

skywind3000 commented Feb 1, 2018

z.sh prompts

_z_precmd:1: nice(5) failed: operation not permitted

everytime after pressing enter on "Bash for Windows", my shell is zsh

@agkozak
Copy link

agkozak commented Feb 1, 2018

By default, zsh tries to run background jobs at a lower priority, which Windows won't let it do. A good workaround is to put

case $(uname -a) in
   *Microsoft*) unsetopt BG_NICE ;;
esac

in your .zshrc file. That alters zsh's default behavior and fixes the problem entirely, in my experience.

@skywind3000
Copy link
Author

It works, thanks !!

@laurentlucian
Copy link

laurentlucian commented Feb 21, 2019

If the upvoted response doesn't work for you, try putting

# Avoid background processes to not bother Windows
unsetopt BG_NICE

in you .zshrc file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants