1
0

Fix dfm vim not running with closed STDOUT

This commit is contained in:
Noah 2017-01-11 13:24:32 -08:00
parent 91cb299406
commit c0efe968fe

View File

@ -26,6 +26,7 @@ use warnings;
use Cwd qw(getcwd abs_path); use Cwd qw(getcwd abs_path);
use Data::Dumper; use Data::Dumper;
use File::Copy; use File::Copy;
use File::Spec;
use FindBin; use FindBin;
use Getopt::Long; use Getopt::Long;
@ -105,8 +106,9 @@ sub main {
if ($command eq "setup") { if ($command eq "setup") {
setup(); setup();
if (fork() == 0) { if (fork() == 0) {
close(STDOUT); open(STDOUT, '>', File::Spec->devnull());
close(STDERR); open(STDERR, '>', File::Spec->devnull());
print "[`dfm vim` finished]\n";
vim(); vim();
} }
} elsif ($command eq "vim") { } elsif ($command eq "vim") {