awesome-client: read on !tty

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-09-22 11:10:07 +02:00
parent ea5fe413cd
commit 06905f515e
2 changed files with 6 additions and 3 deletions

View File

@ -195,7 +195,10 @@ main(int argc, char **argv)
}
}
if(msg_len > 1)
{
ret_value = send_msg(msg, msg_len);
recv_msg();
}
p_delete(&msg);
}

6
lua.c
View File

@ -819,9 +819,9 @@ luaA_cb(EV_P_ ev_io *w, int revents)
s = lua_tolstring(globalconf.L, -1, &len);
/* ignore ENOENT because the client doesn't create a socket for non-tty */
if (send(w->fd, s, len, 0) == -1 && errno != ENOENT)
warn("can't connect to client UNIX domain socket: %s", strerror(errno));
/* ignore ENOENT because the client may not read */
if (send(w->fd, s, len, 0) == -1) && errno != ENOENT)
warn("can't send back to client via domain socket: %s", strerror(errno));
lua_pop(globalconf.L, 1); /* pop the string */
}