Hello. Philip Guenther wrote in <[email protected]>: |On Sat, 21 Dec 2019, Steffen Nurpmeso wrote: |> I was struggling with a pre-release problem of my mailer, which has an |> increasing test coverage, and was head banging on OpenBSD. (And i was |> wondering whether i should have Cc:'d Philip Guenther for this exact |> problem, but i lost his email address -- Sorry!) | |Heh, no problem.
Nice to see you on the microphone then! :) |> /* There are problems with dup()ing of file-descriptors for child \ |> processes. |> * We have to somehow accomplish that the FILE* fp makes itself \ |> comfortable |> * with the *real* offset of the underlaying file descriptor. |> * POSIX Issue 7 overloaded fflush(3): if used on a readable stream, \ |> then |> * |> * if the file is not already at EOF, and the file is one capable of |> * seeking, the file offset of the underlying open file description \ |> shall |> * be set to the file position of the stream */ | |Wheee: do _any_ BSDs implement that? A quick eyeball of Net, Free, and |Dragonfly find they all do nothing and return either EBADF (Net, Open) or |0 (Free, Dragonfly), the latter with a citation to SUSv3. The test runs on FreeBSD 11.2,3-RC2/12 and also Dragonfly 5.6.1, as well as SunOS 5.9..11, GNU and musl Linux. That is all i have at the moment. |Following citiations...I don't actually see when that requirement came \ |in. |You have a reference to the austingroup bug for that? No, it is shaded CX in C165 and C181, i have no idea when it came in. It is not in IEEE Std 1003.1, 1996 Edition, the only other full text i have (that has 8.2.3.7, but well). G101 authorized guide from 2010 only mentions a clarification 1003.1-2001 #002, "clarifying the interaction of x and streams", but i think streams means memory streams. So i guess it is a vivid part of POSIX Issue 7. (Maybe my memory fooled me and there never was communication on that topic .. i cannot find any mail in my archives (but which start in 2012, and i had losses due to bugs in my mailer). Hmm. My memory was that someone told me about that standard provided possibility to synchronize the "file description" file offset from the "file stream" offset. I am pretty confident that i heared you say something about seek optimizations in a buffer .. but i really cannot find that mail now. I thought it came along in that thread, however.) Ciao, --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
