Re: A question on file flags after fork
In message <16937.1578995...@jinx.noi.kre.to>, Robert Elz wrote: >But you do need some experience reading standards... I would like to pause just longe enough to thank you all for the unambiguously patronizing and derogatory manner in which you have welcomed me into your community, all due apparently to my unforgivable inability to instantly grasp the fine and semantically critical distinction between the words "descriptor" and "description". For the record, I served in the 1990s on both the C9X standardization committee and also the original C++ standardization committee, the former with what I believe could be called distinction, since in that instance I contributed a quite sizable number of both questions and clarifications which were deemed of value to that effort. Separately, I was a major contributor to the standardization of DWARF syntax and semantics which, if you have ever found yourselves debugging any program in any compiled language on any modern *NIX system you have most probably benefitted from. I will be leaving you now, in peace. My sincere apologies for having disturbed your deliberations. You have certainly succeeded in persuading me that I am unworthy of even asking a question, at least not here, but I shall most certainly be recommending this group and this mailing list to any of my cohorts who feel themselves to be inadequately demeaned by their spouses and/or immediate family members. Regards, rfg
Re: A question on file flags after fork
In message , Danny Niu wrote: >Anyway, this mailing list should focus on **standard development**, >questions like this of yours should go to places like unix.stackexchange.com. I can only thank you for your kindness, grace, generosity, and understanding. I'm sure that these will all inspire others more worthy than myself to wish to contribute meaningfully to the ongoing standardization effort. Regards, rfg
Re: A question on file flags after fork
In message <1676199645.11146898.1578981958...@mail.yahoo.com>, Shware Systems wrote: >Short answer, because both file descriptors reference the same file >description... OK. I see where I took a wrong turn now, however I must say that I cannot blame myself for having done so. The language being used for the base concepts here is exceptionally stilted. We have -descriptors- and then we have file -descriptions-. I get it now, but I cannot help but wish that the original drafters, way back when, had elected to be a bit less clever and bit more obvious in their coinage of the relevant terminology here. The term "file desctriptor" was grandfathered in from the ancient times of UNIX. So that was cast in stone and could not be reasonably changed. But I would have been a LOT happier if those standard drafters, back in the day, had elected to call what is apparently now called a "file description" something else... a "purple aardvark" or basically anything other that the thing they finally settled on, which is extraordinarily subject to misinterpretation, being as it is, so close to the term "file descriptor". Moving ahead, now that my misreading has been corrected, I'd like to just throw out a trial balloon and note that it would be pragmatically useful to provide some attributes that are currently associated only with "file descriptions" also for file descriptors. O_NONBLOCK is the one that is most immediately apparent to me, but I can readily imagine usefulness also for permitting things like O_APPEND and even O_RDONLY and O_WRONLY to be applied selectively to individual file descriptors, rather than to (shared) file descriptions. I will happily elaborate on a real-world scenario in which this would have been most useful to have, if anyone is interested, and also the ugly ccode contortions that had to be applied in order to work-around this particular non- feature, which I am now aware is 100% standard conformant. Regards, rfg
Re: A question on file flags after fork
In message , Danny Niu wrote: >To a process, a "file descriptor" is a pointer to the "open file description" >in >the kernel-administered memory space/range. The two are related, but have >different set of flags. Can you point to specific passages of the stadard, or draft standard, that support either of those assertions? >The currently (only) defined flag for "file descriptor" is the "close-on-exec" >flag where as there's many more flags for the "open file description". Same question. Can you quote chapter and verse from the actual standard, or draft standard, to supoprt what you have asserted? >You can find out more about the 2 concepts in the base volume. Hope this >helps. Not really. But I appreciate the effort. Regards, rfg