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

autojump_chpwd:4: nice(5) failed: operation not permitted #474

Open
pgrm opened this issue Mar 12, 2017 · 4 comments
Open

autojump_chpwd:4: nice(5) failed: operation not permitted #474

pgrm opened this issue Mar 12, 2017 · 4 comments

Comments

@pgrm
Copy link

pgrm commented Mar 12, 2017

I'm using autojump on Bash on Windows - I had an older laptop with the latest insider preview builds, ubuntu 16.04 and it worked fine. On my new laptop, it also worked fine, until I switched to insider preview (slow ring) and upgraded to Ubuntu 16.04.

Now I get the error message autojump_chpwd:4: nice(5) failed: operation not permitted after every j or cd command. For instance:

> $ cd ~
autojump_chpwd:4: nice(5) failed: operation not permitted
> $ j sync
/mnt/c/Users/peter/Sync/
autojump_chpwd:4: nice(5) failed: operation not permitted

The operations complete successfully, I get to the right place and echo $? shows 0 but the error message is very annoying. Is there anything I could do to hide it? (or even better, resolve the issue?)

@kerren-ortlepp
Copy link

Hey man,

I use rupa/z on Windows bash and I was getting a very similar error:

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

Check out my fork to see how I fixed it at https://github.com/Kerren/z.

Basically, you've got to redirect that standard output to null. Autojump should still work perfectly. Unfortunately, I haven't used autojump and I'm very happy with z so I won't be able to find where this bug comes from but it's definitely able to be fixed! You just need to find the line where autojump_chpwd occurs and add >/dev/null 2>&1 to the end of it.

Good luck!

@ruixingw
Copy link

ruixingw commented Apr 12, 2017

Hi. Do you also use WSL on Creators Update?
I think this is not a problem of Autojump, see the issue I just opened microsoft/WSL#1887.

@pgrm
Copy link
Author

pgrm commented Apr 12, 2017

@ruixingw I guess it's the same, yes. But I installed WSL ~a month ago and had insider slow ring. I had another laptop which was running WSL bash for ~half a year with insider fast ring, and I never experienced that issue there ... - weird

@ruixingw
Copy link

@pgrm : @daiconrad has given a good workaround: add this to your .zshrc:

unsetopt BG_NICE

I guess you can close this issue now and let's wait for its origin: microsoft/WSL#1838

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