improve error message
This commit is contained in:
parent
6a6dd32dea
commit
8ec00f1710
@ -10,6 +10,7 @@
|
||||
#include <signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <errno.h>
|
||||
|
||||
int open_shipper_socket(char *pathname) {
|
||||
int fd;
|
||||
@ -22,7 +23,7 @@ int open_shipper_socket(char *pathname) {
|
||||
fd = socket(AF_LOCAL, SOCK_STREAM, 0);
|
||||
if(fd >= 0) {
|
||||
if(connect(fd, (struct sockaddr *) &sa, sizeof sa)) {
|
||||
perror("connect socket");
|
||||
error(0, errno, "connect socket \"%s\"", pathname);
|
||||
return -1;
|
||||
}
|
||||
int flags = fcntl(fd, F_GETFL);
|
||||
|
Loading…
Reference in New Issue
Block a user