mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibCore: Add a way to mark a socket as blocking (or not)
If custom I/O is being done outside CIODevice, we need a way to force blocking sometimes. This also fixes the default of CLocalSocket to be non-blocking, the same as CTCPSocket.
This commit is contained in:
committed by
Andreas Kling
parent
6aa77d1999
commit
a714fc661d
@@ -4,7 +4,7 @@
|
||||
CLocalSocket::CLocalSocket(CObject* parent)
|
||||
: CSocket(CSocket::Type::Local, parent)
|
||||
{
|
||||
int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_CLOEXEC, 0);
|
||||
int fd = socket(AF_LOCAL, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0);
|
||||
if (fd < 0) {
|
||||
set_error(fd);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user