← Commit list

0dae3b2690

Viktor Szakats
Viktor Szakats
2026-06-15
SUCCESS Duration: 178s

Subject

servers: accept `lstat()` failing due to the file missing

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/server/util.c+3 -2
@@ -699,12 +699,13 @@ int bind_unix_socket(curl_socket_t sock, const char *unix_socket,
/* socket server is not alive, now check if it was actually a socket. */
{
curlx_struct_stat statbuf;
- if(lstat(unix_socket, &statbuf)) {
+ rc = lstat(unix_socket, &statbuf);
+ if(rc && errno != ENOENT) {
logmsg("Error binding socket, failed to stat %s (%d) %s", unix_socket,
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
return -1;
}
- if((statbuf.st_mode & S_IFMT) != S_IFSOCK) {
+ if(!rc && (statbuf.st_mode & S_IFMT) != S_IFSOCK) {
logmsg("Error binding socket, %s is not a socket", unix_socket);
return -1;
}