Skip to content

Commit

Permalink
[dmctl.cc] Ignore SIGPIPE (we check for errors instead)
Browse files Browse the repository at this point in the history
On a Raspberry Pi install, daemon-manager is responding to the dmctl connect
so quickly that the first write never even gets out (it always does on my
Mac and x86-64 debian machines). This is the first step to getting the real
error message to print instead of nothing.

Re: dm-9
Re: c5bf7ab5b05c63410d144158adb6c6ddc70bb341
  • Loading branch information
caldwell committed Jun 29, 2015
1 parent 33df3bb commit 4d6d483
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dmctl.cc
Expand Up @@ -13,6 +13,7 @@
#include <poll.h>
#include <stdexcept>
#include <sys/stat.h>
#include <signal.h>
#include "command-sock.h"
#include "user.h"
#include "stringutil.h"
Expand Down Expand Up @@ -43,6 +44,8 @@ int main(int argc, char **argv)
if (o.get("help", 'h')) usage(argv[0], EXIT_SUCCESS);
if (o.bad_args() || o.args.size() > 2) usage(argv[0], EXIT_FAILURE);

signal(SIGPIPE, SIG_IGN);

int command_socket;
try {
struct sockaddr_un addr = command_sock_addr();
Expand Down

0 comments on commit 4d6d483

Please sign in to comment.