ERRORS
Close() will fail if:
[EBADF] D is not an active descriptor.
[EINTR] An interrupt was received.
</unecessarily complete information>
But agreed, always checking the return value from system calls is good practice (just like you should always check your optics before testing your high powered laser when that jerk Kent's around . . . </Real Genius>).
Update:
Ooop, tilly is correct below. Perl's close is more akin to fclose(3) than close(2) and can return with errno of any of the errors from close(2) or fflush(3) (and fflush(3) in turn may set errno if an underlying write(2) failed).
|