aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-12-17 00:30:53 +0100
committerTeddy Wing2017-12-17 00:30:53 +0100
commitc9bec2cd5af8fb779f93727f63a4ae60b0eb2347 (patch)
tree007ddacaead770306850429d92de620e12bc015a
parent6e8be1797928ba9fb49536d13f8c407ea50a7333 (diff)
downloadirssi-vimput-c9bec2cd5af8fb779f93727f63a4ae60b0eb2347.tar.bz2
update_input_line_when_finished: Send error messages to pipe
Where we had previously `die`d, instead send those error messages to our pipe so they can be printed by the parent process using: Irssi::print(<error>, MSGLEVEL_CLIENTERROR);
-rw-r--r--vimput.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/vimput.pl b/vimput.pl
index 042f830..0305c6c 100644
--- a/vimput.pl
+++ b/vimput.pl
@@ -93,14 +93,18 @@ sub update_input_line_when_finished {
};
mkfifo($fifo_path, 0600) or do {
+ print $write_handle ERROR_PREFIX . "Failed to make FIFO: $!";
+
cleanup();
- # die $!;
+
POSIX::_exit(1);
};
open my $fifo, '<', $fifo_path or do {
+ print $write_handle ERROR_PREFIX . "Failed to open FIFO: $!";
+
cleanup();
- # die $!;
+
POSIX::_exit(1);
};
$fifo->autoflush(1);