diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2017-01-20 07:51:15 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2017-01-20 07:51:15 +0900 |
commit | 51a5f2cc0d9b1b07cda190e787fc61b37139222d (patch) | |
tree | 5cb45e647ff960e1ff0348b5925d849d498c9ba1 | |
parent | 40d1b92e64809e7e9f3fae483957c6ce070ee936 (diff) | |
download | launchpad-51a5f2cc0d9b1b07cda190e787fc61b37139222d.tar.gz launchpad-51a5f2cc0d9b1b07cda190e787fc61b37139222d.tar.bz2 launchpad-51a5f2cc0d9b1b07cda190e787fc61b37139222d.zip |
Prevent SIGPIPE
- Use MSG_NOSIGNAL option
Change-Id: I62cbf54ca004b65e022f3365ee6930a92674b165
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r-- | src/launchpad_common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/launchpad_common.c b/src/launchpad_common.c index 8d6c001..5e998c5 100644 --- a/src/launchpad_common.c +++ b/src/launchpad_common.c @@ -250,7 +250,7 @@ int _send_cmd_to_amd(int cmd) } pkt.cmd = cmd; - ret = send(fd, &pkt, sizeof(app_pkt_t), 0); + ret = send(fd, &pkt, sizeof(app_pkt_t), MSG_NOSIGNAL); if (ret <= 0) { _E("Failed to send cmd(%d), errno(%d)", cmd, errno); close(fd); @@ -392,7 +392,7 @@ int _send_pkt_raw(int client_fd, app_pkt_t *pkt) pkt_size = AUL_PKT_HEADER_SIZE + pkt->len; - send_ret = send(client_fd, pkt, pkt_size, 0); + send_ret = send(client_fd, pkt, pkt_size, MSG_NOSIGNAL); _D("send(%d) : %d / %d", client_fd, send_ret, pkt_size); if (send_ret == -1) { @@ -609,7 +609,7 @@ int _connect_to_launchpad(int type, int id) _D("re-connect to %s (%d)", addr.sun_path, retry); } - send_ret = send(fd, &client_pid, sizeof(client_pid), 0); + send_ret = send(fd, &client_pid, sizeof(client_pid), MSG_NOSIGNAL); _D("send(%d) : %d", client_pid, send_ret); if (send_ret == -1) { |