mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +00:00
LibCore: Consistently treat file descriptors as handles on Windows
Also: * implement dup and is_socket * implement and call init_crt_and_wsa
This commit is contained in:
parent
259cd70c1b
commit
b77016cc34
Notes:
github-actions[bot]
2025-02-06 02:28:45 +00:00
Author: https://github.com/stasoid
Commit: b77016cc34
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3166
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/gmta
6 changed files with 120 additions and 49 deletions
|
@ -1004,4 +1004,10 @@ int getpid()
|
|||
return ::getpid();
|
||||
}
|
||||
|
||||
bool is_socket(int fd)
|
||||
{
|
||||
auto result = fstat(fd);
|
||||
return !result.is_error() && S_ISSOCK(result.value().st_mode);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue