summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8d3dbf0)
Used in normal operation, should not print error.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
{
struct sockaddr_un sun;
int fd;
{
struct sockaddr_un sun;
int fd;
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
perror("socket");
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
perror("socket");
ret = connect(fd, (struct sockaddr *) &sun, sizeof(sun));
if (ret < 0) {
ret = connect(fd, (struct sockaddr *) &sun, sizeof(sun));
if (ret < 0) {
- perror("connect");
- goto error;
+ /*
+ * Don't print message on connect error, because connect
+ * is used in normal execution to detect if sessiond is
+ * alive.
+ */
+ goto error_connect;
+error_connect:
+ close(fd);