← Commit list

0fe67b16c

Denis Vlasenko
Denis Vlasenko
2007-05-24
FAILED Duration: 11s

Subject

udhcp: socketpair can fail if AF_UNIX is not available (e.g. if module is not loaded). Error out on that.

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 →

networking/udhcp/signalpipe.c+3 -1
@@ -36,7 +36,9 @@ static void signal_handler(int sig)
* and installs the signal handler */
void udhcp_sp_setup(void)
{
- socketpair(AF_UNIX, SOCK_STREAM, 0, signal_pipe);
+// BTW, why socketpair and not just pipe?
+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, signal_pipe))
+ bb_perror_msg_and_die("socketpair");
fcntl(signal_pipe[0], F_SETFD, FD_CLOEXEC);
fcntl(signal_pipe[1], F_SETFD, FD_CLOEXEC);
signal(SIGUSR1, signal_handler);