This is case 2, "Close is guaranteed to leave the file open on error."
In this case, all applications are required to reissue close commands
upon certain errors, or leak a file descriptor. This would be a well
defined behavior, though perhaps error prone.
However, note that this is manifestly different from case 1, "Close is
guaranteed to close the file the first time." If the system behaves via
case 1, closing the handle again is broken as the example illustrated.
The worst, of course, would be undefined behavior for close. In this
case, the application effectively can't do the right thing without
extreme measures.
-J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/