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

hardlink handling broken #4816

Closed
lnussel opened this issue Jan 16, 2020 · 3 comments
Closed

hardlink handling broken #4816

lnussel opened this issue Jan 16, 2020 · 3 comments

Comments

@lnussel
Copy link

lnussel commented Jan 16, 2020

  • Windows build number: 10.0.19041.21

  • What you're doing and what's happening:

#!/bin/bash
rm -rf /var/tmp/d{1,2,3}
mkdir /var/tmp/d{1,2,3}
echo "create file in d1"
echo hello > /var/tmp/d1/somefile
ls /var/tmp/d{1,2,3}
echo "link file from d1 to d2"
ln /var/tmp/d1/somefile /var/tmp/d2/somefile
ls /var/tmp/d{1,2,3}
echo "remove d1"
rm -r /var/tmp/d1
ls /var/tmp/d{1,2,3}
echo "link from d2 to d3"
ln /var/tmp/d2/somefile /var/tmp/d3/somefile
ls /var/tmp/d{2,3}

The last ln call results in an "permission denied" error even though the code is correct and will work on a real Linux.
Looks like the removal of the original directory (d1) triggers this behavior.

The package manager (zypp) in openSUSE relies on the hardlink semantic to work.

@therealkenc
Copy link
Collaborator

therealkenc commented Jan 16, 2020

/dupe #1529. You're particular scenario (on /var/tmp) is addressed in WSL2. Expected output from this script below.

[edit] Better dupe LZ #3972. A wsl.exe --shutdown resolves, which makes this scenario different enough from #1529 (where the handle really is held open by some identifiable running process).

image

@ghost
Copy link

ghost commented Jan 16, 2020

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost added the duplicate label Jan 16, 2020
@ghost
Copy link

ghost commented Jan 16, 2020

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

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

No branches or pull requests

2 participants