complete-run: close all fds except for 0, 1, 2
running in a VIM subshell leads to one more fd, for example
This commit is contained in:
@ -24,10 +24,15 @@ use StartXDummy;
|
||||
use StatusLine;
|
||||
# the following modules are not shipped with Perl
|
||||
use AnyEvent;
|
||||
use AnyEvent::Util;
|
||||
use AnyEvent::Handle;
|
||||
use AnyEvent::I3 qw(:all);
|
||||
use X11::XCB;
|
||||
|
||||
# Close superfluous file descriptors which were passed by running in a VIM
|
||||
# subshell or situations like that.
|
||||
AnyEvent::Util::close_all_fds_except(0, 1, 2);
|
||||
|
||||
# We actually use AnyEvent to make sure it loads an event loop implementation.
|
||||
# Afterwards, we overwrite SIGCHLD:
|
||||
my $cv = AnyEvent->condvar;
|
||||
|
Reference in New Issue
Block a user