public long spawnInternal(ThreadContext context, IRubyObject[] argv, String[] errmsg) { ExecArg eargp; long ret; eargp = execargNew(context, argv, true); execargFixup(context, context.runtime, eargp); ret = spawnProcess(context, context.runtime, eargp, errmsg); return ret; }
public long spawnInternal(ThreadContext context, IRubyObject[] argv, String[] errmsg) { ExecArg eargp; long ret; eargp = execargNew(context, argv, true); execargFixup(context, context.runtime, eargp); ret = spawnProcess(context, context.runtime, eargp, errmsg); return ret; }
public static RubyFixnum spawn(ThreadContext context, IRubyObject[] argv) { Ruby runtime = context.runtime; long pid = 0; String[] errmsg = { null }; ExecArg eargp; IRubyObject fail_str; eargp = execargNew(context, argv, true); execargFixup(context, runtime, eargp); fail_str = eargp.use_shell ? eargp.command_name : eargp.command_name; PopenExecutor executor = new PopenExecutor(); pid = executor.spawnProcess(context, runtime, eargp, errmsg); if (pid == -1) { if (errmsg[0] == null) { throw runtime.newErrnoFromErrno(executor.errno, fail_str.toString()); } throw runtime.newErrnoFromErrno(executor.errno, errmsg[0]); } return runtime.newFixnum(pid); }
public static RubyFixnum spawn(ThreadContext context, IRubyObject[] argv) { Ruby runtime = context.runtime; long pid = 0; String[] errmsg = { null }; ExecArg eargp; IRubyObject fail_str; eargp = execargNew(context, argv, true); execargFixup(context, runtime, eargp); fail_str = eargp.use_shell ? eargp.command_name : eargp.command_name; PopenExecutor executor = new PopenExecutor(); pid = executor.spawnProcess(context, runtime, eargp, errmsg); if (pid == -1) { if (errmsg[0] == null) { throw runtime.newErrnoFromErrno(executor.errno, fail_str.toString()); } throw runtime.newErrnoFromErrno(executor.errno, errmsg[0]); } return runtime.newFixnum(pid); }
execargFixup(context, runtime, eargp); } catch (RaiseException re) { // if (state) if (writePair[0] != -1) runtime.getPosix().close(writePair[0]);
execargFixup(context, runtime, eargp); } catch (RaiseException re) { // if (state) if (writePair[0] != -1) runtime.getPosix().close(writePair[0]);