cs-education / sysbuild

A system programming learning environment in the browser
https://cs-education.github.io/sys/
Other
36 stars 35 forks source link

Hardlinks not properly supported and fail silently #168

Open angrave opened 8 years ago

angrave commented 8 years ago

Steps to reproduce

echo 'blahblah' > file1
ln file1 file2
ls -i file1 file2
#Expect both files to have the same inode number.
#Instead a new 'strange' file is created (see below); 
cat file2
#Expect to see blablah
echo foo >>file2
#The above fails with permission denied! Instead we expect the file contents  to be blahblahfoo

FYI Minor followup: Make sure new links also appear in the file browser (they don't) FYI This also fails in a similar fashion if the hard link is created from C using link(2). FYI A quick test of symbolic links suggest they work as expected. FYI No difference in behavior between /sys and staging

neelabhg commented 8 years ago

I could reproduce this on http://jor1k.com as well. I'll open an issue upstream.