From df31b88187bc1e262abbeddc63c6cde6331bf07a Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Thu, 10 Dec 2015 11:00:10 +0300 Subject: Fix "unused result" warnings for several system calls. --- src/remote.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/remote.cc') diff --git a/src/remote.cc b/src/remote.cc index 6169e906..e15d4d0f 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -532,7 +532,8 @@ void RemoteClient::write_next_key() void send_command(StringView session, StringView command) { int sock = connect_to(session); - ::write(sock, command.data(), (int)command.length()); + if (::write(sock, command.data(), (int)command.length()) < 0) + throw runtime_error(format("unable to write data to socket (fd: {}; errno: {})", sock, ::strerror(errno))); close(sock); } -- cgit v1.2.3