ipc: Add error message on bind failure.

This commit is contained in:
Ryan Pavlik 2020-05-07 16:53:19 -05:00
parent c4f8c7fdf7
commit 83cace51d4

View file

@ -224,6 +224,14 @@ create_listen_socket(struct ipc_server *s, int *out_fd)
ret = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
if (ret < 0) {
fprintf(stderr,
"ERROR: Could not bind socket: is the "
"service running already?\n");
#ifdef XRT_HAVE_SYSTEMD
fprintf(stderr,
"Or, is the systemd unit monado.socket or "
"monado-dev.socket active?\n");
#endif
close(fd);
return ret;
}