if (eargp.pgroup_given()) { throw runtime.newArgumentError("pgroup option specified twice"); eargp.pgroup_given_set(); eargp.pgroup_pgid = pgroup; if (eargp.unsetenv_others_given()) { throw runtime.newArgumentError("unsetenv_others option specified twice"); eargp.unsetenv_others_given_set(); if (!val.isNil()) { eargp.unsetenv_others_do_set(); } else { eargp.unsetenv_others_do_clear(); if (eargp.chdir_given()) { throw runtime.newArgumentError("chdir option specified twice"); eargp.chdir_given_set(); eargp.chdir_dir = valTmp.toString(); if (eargp.umask_given()) { throw runtime.newArgumentError("umask option specified twice"); eargp.umask_given_set(); eargp.umask_mask = cmask; if (eargp.close_others_given()) { throw runtime.newArgumentError("close_others option specified twice");
String[] envp = null; ExecArg sargp = new ExecArg(); int fd; int write_fd = -1; cmd = StringSupport.checkEmbeddedNulls(runtime, prog).toString(); if (eargp.chdir_given()) { eargp.chdir_given_clear();
prog = RubyString.newString(runtime, arg); else if (!eargp.chdir_given()) { // only if :chdir is not specified eargp.chdir_given_set(); eargp.chdir_dir = runtime.getCurrentDirectory(); if (eargp.chdir_given() && argc > 1) { RubyArray array = RubyArray.newArrayMayCopy(runtime, argv); prog = (RubyString)array.join(context, RubyString.newString(runtime, " ")); eargp.use_shell = argc == 0 || eargp.chdir_given(); if (eargp.use_shell) eargp.command_name = prog; has_meta = true; if (!has_meta && !eargp.chdir_given()) {
prog = RubyString.newString(runtime, arg); else if (!eargp.chdir_given()) { // only if :chdir is not specified eargp.chdir_given_set(); eargp.chdir_dir = runtime.getCurrentDirectory(); if (eargp.chdir_given() && argc > 1) { RubyArray array = RubyArray.newArrayMayCopy(runtime, argv); prog = (RubyString)array.join(context, RubyString.newString(runtime, " ")); eargp.use_shell = argc == 0 || eargp.chdir_given(); if (eargp.use_shell) eargp.command_name = prog; has_meta = true; if (!has_meta && !eargp.chdir_given()) {
if (eargp.pgroup_given()) { throw runtime.newArgumentError("pgroup option specified twice"); eargp.pgroup_given_set(); eargp.pgroup_pgid = pgroup; if (eargp.unsetenv_others_given()) { throw runtime.newArgumentError("unsetenv_others option specified twice"); eargp.unsetenv_others_given_set(); if (!val.isNil()) { eargp.unsetenv_others_do_set(); } else { eargp.unsetenv_others_do_clear(); if (eargp.chdir_given()) { throw runtime.newArgumentError("chdir option specified twice"); eargp.chdir_given_set(); eargp.chdir_dir = valTmp.toString(); if (eargp.umask_given()) { throw runtime.newArgumentError("umask option specified twice"); eargp.umask_given_set(); eargp.umask_mask = cmask; if (eargp.close_others_given()) { throw runtime.newArgumentError("close_others option specified twice");
String[] envp = null; ExecArg sargp = new ExecArg(); int fd; int write_fd = -1; cmd = StringSupport.checkEmbeddedNulls(runtime, prog).toString(); if (eargp.chdir_given()) { eargp.chdir_given_clear();
if (eargp.pgroup_given()) { if (run_exec_pgroup(runtime, eargp, sargp, errmsg) == -1) /* async-signal-safe */ return -1; if (eargp.unsetenv_others_given() && eargp.unsetenv_others_do()) { if (eargp.umask_given()) { throw runtime.newNotImplementedError("setting umask in child is unsupported"); if (eargp.chdir_given()) { if (eargp.gid_given()) { throw runtime.newNotImplementedError("setgid in the child is not supported"); if (eargp.uid_given()) { throw runtime.newNotImplementedError("setuid in the child is not supported");
if (eargp.pgroup_given()) { if (run_exec_pgroup(runtime, eargp, sargp, errmsg) == -1) /* async-signal-safe */ return -1; if (eargp.unsetenv_others_given() && eargp.unsetenv_others_do()) { if (eargp.umask_given()) { throw runtime.newNotImplementedError("setting umask in child is unsupported"); if (eargp.chdir_given()) { if (eargp.gid_given()) { throw runtime.newNotImplementedError("setgid in the child is not supported"); if (eargp.uid_given()) { throw runtime.newNotImplementedError("setuid in the child is not supported");
long spawnProcess(ThreadContext context, Ruby runtime, ExecArg eargp, String[] errmsg) { long pid; RubyString prog; ExecArg sarg = new ExecArg(); if (eargp.chdir_given()) { eargp.chdir_given_clear();
long spawnProcess(ThreadContext context, Ruby runtime, ExecArg eargp, String[] errmsg) { long pid; RubyString prog; ExecArg sarg = new ExecArg(); if (eargp.chdir_given()) { eargp.chdir_given_clear();
public static ExecArg execargNew(ThreadContext context, IRubyObject[] argv, boolean accept_shell) { ExecArg eargp = new ExecArg(); execargInit(context, argv, accept_shell, eargp); return eargp; }
public static ExecArg execargNew(ThreadContext context, IRubyObject[] argv, boolean accept_shell) { ExecArg eargp = new ExecArg(); execargInit(context, argv, accept_shell, eargp); return eargp; }