Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> The filesystem APIs could be extended with a "CWD" handle argument that can be passed around

Why would you even want a working directory at that point?



What's the alternative? To use absolute paths for everything? That seems kind of tedious, and may be slightly less performant if the kernel has to do more dentry lookups.

I think the idea of a current working directory is a reasonable one, it's just that the limitation that a process can only have one CWD at a time is kind of arbitrary when you think about it.

I could even see having commands that take multiple CWDs. Like a move operation could take a source and a destination CWD as an alternative to specifying source and destination paths.


Directory file descriptors already exist. I wouldn't call them "current working" directories though. Are you suggesting an expansion of those, or something different from those?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: