We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5481fdf commit a1cdee3Copy full SHA for a1cdee3
src/wdctl.c
@@ -153,6 +153,10 @@ connect_to_server(const char *sock_name)
153
154
/* Connect to socket */
155
sock = socket(AF_UNIX, SOCK_STREAM, 0);
156
+ if (sock < 0) {
157
+ fprintf(stderr, "wdctl: could not get socket (Error: %s)\n", strerror(errno));
158
+ exit(1);
159
+ }
160
memset(&sa_un, 0, sizeof(sa_un));
161
sa_un.sun_family = AF_UNIX;
162
strncpy(sa_un.sun_path, sock_name, (sizeof(sa_un.sun_path) - 1));
0 commit comments