From c9bec2cd5af8fb779f93727f63a4ae60b0eb2347 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 17 Dec 2017 00:30:53 +0100 Subject: 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(, MSGLEVEL_CLIENTERROR); --- vimput.pl | 8 ++++++-- 1 file 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); -- cgit v1.2.3