4 ms·
There unfortunately isn't a command to hardlink the file. ln will fail, because /proc is a different filesystem: anthony@Zia:/proc/28590/fd$ ln 4 /tmp/bar
by derobert 15y ago
There unfortunately isn't a command to hardlink the file. ln will fail, because /proc is a different filesystem:
anthony@Zia:/proc/28590/fd$ ln 4 /tmp/bar
ln: creating hard link `/tmp/bar' => `4': Invalid cross-device link
Linux's link(2) call takes path names, not file descriptors, so even a ptrace inject into the still-running app won't help.
I don't believe its (currently) possible to re-link the file, without direct filesystem editing.
- wccrawford 15y agoAh, thanks. Sounds like a good weekend project to see if it can be done. :) I think I'll add it to my list in case nobody else does it.