#39 fc -W/-A fails silently when hard links don't work

open
nobody
None
5
2013-01-25
2008-05-21
Ben Leslie
No

When running zsh on a filesystem that does not support hard links history saving mechanism does not work, and fails silently. "fc -W" and "fc -A", also fail silently. Specifically, they do not cause a file to be written, but do not print a warning to stderr, or return a non-zero return code.

The cause of the file not being written in this case is that zsh is compiled to run on a file-system with hard links, but the file system does not support hard links (hgfs, the vmware shared folders file system in this case).

The lockhistfile() function in Src/hist.c should better determine the case, and return an appropriate error code, which should be propagated up to the fc command.

This is a low priority bug, as there are of course easy work around available: compile zsh without hard link support, or set HISTFILE to reside on a filesystem supporting hardlinks. However it is extremely frustrating, I had to bust out strace to find out what was going on.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks