Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Sortie, would you share what POSIX reference you used for the implementation? I wanted to read and understand it for a while, but I never made through the only one I found [1]. Maybe there are alternative sources?

[1] http://pubs.opengroup.org/onlinepubs/9699919799/nframe.html



sort by: page size:

There is a proposal to make a Posix interface that is essentially similar.[1]

[1] http://austingroupbugs.net/view.php?id=859


Also, readlink (the function anyway) is in the POSIX[0] spec.

[0] http://pubs.opengroup.org/onlinepubs/9699919799/


FWIW, the POSIX equivalents are `ftw` and `nftw`[1]. POSIX 2008 deprecates `ftw`.

[1]: https://pubs.opengroup.org/onlinepubs/9699919799//functions/...


  pwd -P
would be equivalent and more portable (POSIX compliant[1]) than

  readlink -f .
which doesn't work on BSD-based systems.

[1]: http://pubs.opengroup.org/onlinepubs/009696899/utilities/pwd...


Me Too - For OS/2, and it was direct threaded code

https://sourceforge.net/p/forth2/wiki/Home/



Wow, TIL indeed. That's conformant to the Single UNIX Specification as well: https://pubs.opengroup.org/onlinepubs/007908799/xcu/echo.htm...

was surprised to see no mention of:

http://www.gnu.org/s/hello/manual/libc/Obstacks.html

seems like a very similar concept / means to an end?


Isn't that explained in the link in the very first question?

https://lists.gnu.org/archive/html/parallel/2013-11/msg00006...


The reason isn't that bizarre; it's a POSIX utility and must conform to the specification, which you can read here:

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/c...


The same way it made it into production on POSIX?

O_TRUNC is not default: https://man7.org/linux/man-pages/man2/openat.2.html


Another huge load of BS. What is your goal here?

> epoll/kqueue

Here is the implementation from 2.1, back maybe around 10 years ago:

https://github.com/varnishcache/varnish-cache/blob/2.1/bin/v...

https://github.com/varnishcache/varnish-cache/blob/2.1/bin/v...

> nginx thread model

https://www.nginx.com/blog/thread-pools-boost-performance-9x...

> With sendfile(2) and splice(2) you are only wiring up the activity to be done in your event loop

Why you are storing your cache on disk into individual files when its "2018 and RAM is commonly measured in many hundred GB" is beyond me. But its not even worth discussing because you will just introduce more BS, FUD, and techno babble.


For those wondering why they may have done this, there’s a relevant section in the GNU Coding Standards:

https://www.gnu.org/prep/standards/html_node/Reading-Non_002...

This appears to be a case where they went for speed rather than simplicity.


FYI the interface format seems to be inspired by borg-prune[1].

[1] https://borgbackup.readthedocs.io/en/stable/usage/prune.html


It is probably for compatibility with the way POSIX handles $PATH https://pubs.opengroup.org/onlinepubs/9699919799.2018edition...

Oddly enough, POSIX does not state that opendir and readdir can return EINTR ;) - though I'm sure this must be an oversight? I doubt this is possible to guarantee in practice:

https://pubs.opengroup.org/onlinepubs/9699919799/functions/o...

https://pubs.opengroup.org/onlinepubs/9699919799/functions/r...

closedir may:

https://pubs.opengroup.org/onlinepubs/9699919799/functions/c...


Interesting, I wasn't familiar with this standard. It sounds like this has been adopted by some other architectures besides Itanium as well:

http://wiki.dwarfstd.org/index.php?title=Exception_Handling


Apparently, recent Windows uses POSIX semantics by default: https://news.ycombinator.com/item?id=23745019

Isn't this just log structured storage [1], essentially?

[1]: http://blog.notdot.net/2009/12/Damn-Cool-Algorithms-Log-stru...

next

Legal | privacy