-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Creators Update (15063.138)
A fresh new WSL by:
lxrun.exe /uninstall /full
lxrun.exe /install
Now in WSL:
sudo apt-get update
sudo apt-get install zsh
Go to ZSH by "%SYSTEMROOT%\System32\bash.exe" -c zsh (I use ConEmu)
Put any command to background with &. It seems that the command is properly executed, but an annoying error message also shows.
Surface-SP4% echo "test" > test
Surface-SP4% echo "test" > test &
[1] 611
Surface-SP4% zsh: nice(5) failed: operation not permitted
[1] + done echo "test" > test
Surface-SP4% echo "test" > test &!
Surface-SP4% zsh: nice(5) failed: operation not permittedSurface-SP4% ping -c 3 8.8.8.8 &
Surface-SP4% zsh: nice(5) failed: operation not permitted
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=46 time=19.6 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=46 time=24.2 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=46 time=17.5 ms
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 17.532/20.459/24.204/2.789 ms
[1] + done ping -c 3 8.8.8.8
Other post had also reported this problem for specific programs, but I found the problem is actually generic for any command.
Autojump: wting/autojump#474
I further looked into the "autojump_chpwd" function, and it also used "&" to put command to background.
z: kerren-ortlepp/z@b04976c
z also uses "&" and has the same problem. This commit just use> /dev/nullto ignore the error message
Both of the two issues are on WSL too.
I used WSL+ZSH in 14393 anniversary update as well, and it worked well without any problem. Hence I don't think this is an issue of ZSH, but perhaps WSL itself has changed something afterward.
EDIT: wting/autojump#474 said the following:
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
- Expected results
No error message. - Actual results (with terminal output if applicable)
zsh: nice(5) failed: operation not permitted - Your Windows build number
Creators Update(15063.138), - Steps / All commands required to reproduce the error from a brand new installation
sudo apt-get update
sudo apt-get install zsh
zsh
echo "test" > test &
ping -3 8.8.8.8 &
- Strace of the failing command
https://pastebin.com/B25G4tWb