From: Miro K. <mir...@gm...> - 2024-09-16 06:47:08
|
On Mon, 16 Sept 2024 at 08:15, Thorsten Otto via Freemint-discuss < fre...@li...> wrote: > First off, the mask 0x8000 will result in a negative value if you assign > it to a 16bit variable. > Is that a problem? Fopen() and friends return the corresponding file handle in the lower WORD of the positive LONG, or a negative error-message. But even if it were a problem, I can always change the mask to 0x4000 (16k opened files per process, still far away from the current 1024 limit). > And secondly, what if you want to use the file handle in a Fselect() or > Fpoll() call? > Hmm. Thanks for this question, it reminded me of one post I saw when trying to learn something about it: https://mikro.naprvyraz.sk/mint/199801/msg00110.html. Back then I didn't understand the question but now I do, and yes, it seems this was a limitation of O_GLOBAL. So allocating one special file descriptor for /dev/console per process seems like a better solution I guess? -- http://mikro.atari.org |