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