diff options
| author | Teddy Wing | 2017-12-17 00:30:53 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-12-17 00:30:53 +0100 |
| commit | c9bec2cd5af8fb779f93727f63a4ae60b0eb2347 (patch) | |
| tree | 007ddacaead770306850429d92de620e12bc015a | |
| parent | 6e8be1797928ba9fb49536d13f8c407ea50a7333 (diff) | |
| download | irssi-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.pl | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); |
