diff options
| author | Teddy Wing | 2017-12-17 00:23:35 +0100 |
|---|---|---|
| committer | Teddy Wing | 2017-12-17 00:23:35 +0100 |
| commit | dd9e692fcedf220bca2b6981184c6ba2738cb6c3 (patch) | |
| tree | 0c6f880a20b47e2465ea956f958a24674472caed | |
| parent | 9c43c1637587e004c4826d79021e4d6164543e1e (diff) | |
| download | irssi-vimput-dd9e692fcedf220bca2b6981184c6ba2738cb6c3.tar.bz2 | |
Delete the error pipe
Now that we're passing errors on the main pipe
(9c43c1637587e004c4826d79021e4d6164543e1e), we no longer need this one.
| -rw-r--r-- | vimput.pl | 37 |
1 files changed, 1 insertions, 36 deletions
@@ -64,16 +64,13 @@ sub open_tmux_split { sub update_input_line_when_finished { return if $forked; - my ($read_handle, $write_handle, $err_read_handle, $err_write_handle); + my ($read_handle, $write_handle); pipe($read_handle, $write_handle); - # pipe($err_read_handle, $err_write_handle); sub cleanup { close $read_handle; close $write_handle; - # close $err_read_handle; - # close $err_write_handle; } my $pid = fork(); @@ -93,12 +90,7 @@ sub update_input_line_when_finished { my $fifo_path = tmpnam(); open_tmux_split($fifo_path, $write_handle) or do { - # print $err_write_handle 'Not running in tmux.'; - # print 'fuck'; - # Irssi::print('fuck'); - # print $write_handle 'ERROR: Not running in tmux.'; cleanup(); - # die; POSIX::_exit(1); }; @@ -138,15 +130,6 @@ sub update_input_line_when_finished { \&pipe_input, \@args, ); - - # my $err_pipe_tag; - # my @err_args = ($err_read_handle, \$err_pipe_tag); - # $err_pipe_tag = Irssi::input_add( - # fileno $err_read_handle, - # Irssi::INPUT_READ, - # \&pipe_error, - # \@err_args, - # ); } } @@ -176,24 +159,6 @@ sub pipe_input { } -sub pipe_error { - my ($args) = @_; - my ($err_read_handle, $err_pipe_tag) = @$args; - - my $input = <$err_read_handle>; - - Irssi::print($input, MSGLEVEL_CLIENTERROR); - - $forked = 0; - - close $err_read_handle; - Irssi::input_remove($$err_pipe_tag); - - kill 'TERM', $child; - undef $child; -} - - sub is_child_fork { my ($pid) = @_; |
