+# like system() built-in, but uses spawn() for env/rdr + vfork
+sub xsys {
+ my ($cmd, $env, $rdr) = @_;
+ if (ref($cmd)) {
+ $rdr ||= {};
+ } else {
+ $cmd = [ @_ ];
+ $env = undef;
+ $rdr = {};
+ }
+ run_script($cmd, $env, { %$rdr, run_mode => 0 });
+ $? >> 8
+}
+
+# like `backtick` or qx{} op, but uses spawn() for env/rdr + vfork
+sub xqx {
+ my ($cmd, $env, $rdr) = @_;
+ $rdr //= {};
+ run_script($cmd, $env, { %$rdr, run_mode => 0, 1 => \(my $out) });
+ wantarray ? split(/^/m, $out) : $out;
+}
+