namespace Msp {
namespace IO {
-Handle::operator const void *() const
-{
- return priv->handle!=-1 ? this : 0;
-}
-
-
void sys_set_blocking(Handle &handle, bool b)
{
int flags = fcntl(*handle, F_GETFD);
void sys_close(Handle &handle)
{
- close(*handle);
+ if(handle)
+ {
+ close(*handle);
+ *handle = INVALID_HANDLE_VALUE;
+ }
}
} // namespace IO