awesome-client: read on !tty
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
ea5fe413cd
commit
06905f515e
|
@ -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
6
lua.c
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue