From b0eab5d793e48af1fcfc4b281aab6bfbd10b769b Mon Sep 17 00:00:00 2001 From: mazunki Date: Tue, 9 Nov 2021 19:03:15 +0100 Subject: [PATCH] maybe we shouldn't actually runtime error, but still doing a check --- include/util/command.hpp | 2 +- src/modules/sway/ipc/client.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/util/command.hpp b/include/util/command.hpp index d3a1e437..4920333e 100644 --- a/include/util/command.hpp +++ b/include/util/command.hpp @@ -69,7 +69,7 @@ inline FILE* open(const std::string& cmd, int& pid) { if (cmd == "") return nullptr; int fd[2]; if (pipe(fd) != 0){ - throw std::runtime_error("Couldn't open a file descriptor"); + // std::runtime_error("Couldn't open a file descriptor"); } pid_t child_pid = fork(); diff --git a/src/modules/sway/ipc/client.cpp b/src/modules/sway/ipc/client.cpp index 1111746a..15bdf1e2 100644 --- a/src/modules/sway/ipc/client.cpp +++ b/src/modules/sway/ipc/client.cpp @@ -15,14 +15,14 @@ Ipc::~Ipc() { if (fd_ > 0) { // To fail the IPC header if (write(fd_, "close-sway-ipc", 14) == -1) { - std::runtime_error("Couldn't close Sway IPC through fd"); + //std::runtime_error("Couldn't close Sway IPC through fd"); } close(fd_); fd_ = -1; } if (fd_event_ > 0) { if (write(fd_event_, "close-sway-ipc", 14) == -1) { - std::runtime_error("Couldn't close Sway IPC through fd_event"); + //std::runtime_error("Couldn't close Sway IPC through fd_event"); } close(fd_event_); fd_event_ = -1;