home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: mib@geech.gnu.ai.mit.edu (Michael I Bushnell)
-
- In article <20t4bcINN5jb@rodan.UU.NET> ericb@sierra.com (Eric Blood) writes:
- >The documentation for errno (in the same document) is as follows:
- >
- >"The value of this variable ['errno'] shall be defined only after a
- >call to a function for which it is explicitly stated to be set and
- >until it is changed by the next function call. The variable 'errno'
- >should only be examined when it is indicated to be valid by a
- >function's return value. No function defined in this part of ISO/IEC
- >9945 sets errno to zero to indicate an error."
- >
- >Does this mean I'm allowed to set the errno variable or not? If I'm
- >able to, then I can use the example code with pathconf(). Otherwise,
- >what should I do?
-
- Pedantic answer:
-
- You have to call a function that will set errno to zero (something
- like `kill (getpid (), 0)', and then immediately call pathconf.
- Pathconf documents that it might or might not set errno, so now you
- can look at it.
-
- Real answer:
-
- You have to set errno anyway to write a correct signal handler;
- therefore it's OK to set it here.
-
- -mib
- --
- +1 617 628 6197 (H) | Offer to God a sacrifice of thanksgiving
- +1 617 253 8568 (W) -+- and make good your vows to the Most High.
- 14 Paulina Street | Call upon me in the day of trouble;
- Somerville, MA 02144 | I will deliver you, and you shall honor me.
-
-
- Volume-Number: Volume 31, Number 94
-
-