Fix fcntl(fd, F_SETFL, x) not setting the descriptor flags properly.
This commit is contained in:
parent
187cdf03dc
commit
cab62b77d5
|
@ -122,7 +122,7 @@ bool Descriptor::SetFlags(int new_dflags)
|
||||||
// would kinda prevent concurrency on the same file descriptor. Since
|
// would kinda prevent concurrency on the same file descriptor. Since
|
||||||
// the chances of this becoming a problem is rather slim (but could
|
// the chances of this becoming a problem is rather slim (but could
|
||||||
// happen!), we'll do the unsafe thing for now. (See below also)
|
// happen!), we'll do the unsafe thing for now. (See below also)
|
||||||
dflags = (dflags & ~DESCRIPTOR_FLAGS) & (new_dflags & DESCRIPTOR_FLAGS);
|
dflags = (dflags & ~DESCRIPTOR_FLAGS) | (new_dflags & DESCRIPTOR_FLAGS);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue