long procSpawnSh(Ruby runtime, String str, ExecArg eargp) { long status; String shell = dlnFindExeR(runtime, "sh", eargp.path_env); // System.out.println("before: " + shell + ", fa=" + eargp.fileActions + ", a=" + eargp.attributes + ", argv=" + Arrays.asList("sh", "-c", str)); status = runtime.getPosix().posix_spawnp( shell != null ? shell : "/bin/sh", eargp.fileActions, eargp.attributes, Arrays.asList("sh", "-c", str), eargp.envp_str == null ? Collections.EMPTY_LIST : Arrays.asList(eargp.envp_str)); if (status == -1) errno = Errno.valueOf(runtime.getPosix().errno()); return status; }
long procSpawnSh(Ruby runtime, String str, ExecArg eargp) { long status; String shell = dlnFindExeR(runtime, "sh", eargp.path_env); // System.out.println("before: " + shell + ", fa=" + eargp.fileActions + ", a=" + eargp.attributes + ", argv=" + Arrays.asList("sh", "-c", str)); status = runtime.getPosix().posix_spawnp( shell != null ? shell : "/bin/sh", eargp.fileActions, eargp.attributes, Arrays.asList("sh", "-c", str), eargp.envp_str == null ? Collections.EMPTY_LIST : Arrays.asList(eargp.envp_str)); if (status == -1) errno = Errno.valueOf(runtime.getPosix().errno()); return status; }
prog = dlnFindExeR(runtime, prog, eargp.path_env); if (prog == null) { errno = Errno.ENOENT;
prog = dlnFindExeR(runtime, prog, eargp.path_env); if (prog == null) { errno = Errno.ENOENT;
abspath = dlnFindExeR(runtime, eargp.command_name.toString(), eargp.path_env); if (abspath != null) eargp.command_abspath = StringSupport.checkEmbeddedNulls(runtime, RubyString.newString(runtime, abspath));
abspath = dlnFindExeR(runtime, eargp.command_name.toString(), eargp.path_env); if (abspath != null) eargp.command_abspath = StringSupport.checkEmbeddedNulls(runtime, RubyString.newString(runtime, abspath));