On Mon, Feb 01, 2021 at 07:45:43PM +0000, Jeff Hostetler via GitGitGadget wrote: > static int chdir_len(const char *orig, int len) > { > char *path = xmemdupz(orig, len); > @@ -79,7 +71,10 @@ int unix_stream_connect(const char *path) > > if (unix_sockaddr_init(&sa, path, &ctx) < 0) > return -1; > - fd = unix_stream_socket(); > + fd = socket(AF_UNIX, SOCK_STREAM, 0); > + if (fd < 0) > + die_errno("unable to create socket"); > + Reading the next patch, I suddenly realized that these are die calls, and not just passing along the error (which you then fix in the next patch). It seems like that should be happening here in this patch. Callers must already be ready to handle an error (we return -1 in the context above). > @@ -103,7 +98,9 @@ int unix_stream_listen(const char *path) > > if (unix_sockaddr_init(&sa, path, &ctx) < 0) > return -1; > - fd = unix_stream_socket(); > + fd = socket(AF_UNIX, SOCK_STREAM, 0); > + if (fd < 0) > + die_errno("unable to create socket"); Ditto here. -Peff