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);
+ int flags = fcntl(*handle, F_GETFL);
fcntl(*handle, F_SETFL, (flags&~O_NONBLOCK)|(b?0:O_NONBLOCK));
}