aboutsummaryrefslogtreecommitdiffstats
path: root/vimput.pl
diff options
context:
space:
mode:
Diffstat (limited to 'vimput.pl')
-rw-r--r--vimput.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/vimput.pl b/vimput.pl
index ab63fad..94fe882 100644
--- a/vimput.pl
+++ b/vimput.pl
@@ -66,7 +66,7 @@ sub update_input_line_when_finished {
return;
}
- if ($pid == 0) {
+ if (is_child_fork($pid)) {
my $fifo_path = tmpnam();
open_tmux_split($fifo_path);
@@ -119,6 +119,13 @@ sub pipe_input {
}
+sub is_child_fork {
+ my ($pid) = @_;
+
+ return $pid == 0;
+}
+
+
# TODO: Find out if it's possible to do this is a command
Irssi::signal_add_last 'gui key pressed' => sub {
my ($key) = @_;