o:$YARD::CodeObjects::MethodObject:@scope: class:@visibility:public: @pathI"Process.exec:EF:@parameters[�:@files[[I"process.c;T0:@current_file_has_commentsF: @name: exec:@source_type:c: @tags[�:@docstringIC:YARD::Docstring":Replaces the current process by running the given external _command_. _command..._ is one of following forms. commandline : command line string which is passed to the standard shell cmdname, arg1, ... : command name and one or more arguments (no shell) [cmdname, argv0], arg1, ... : command name, argv[0] and zero or more arguments (no shell) If single string is given as the command, it is taken as a command line that is subject to shell expansion before being executed. The standard shell means always <code>"/bin/sh"</code> on Unix-like systems, <code>ENV["RUBYSHELL"]</code> or <code>ENV["COMSPEC"]</code> on Windows NT series, and similar. If two or more +string+ given, the first is taken as a command name and the rest are passed as parameters to command with no shell expansion. If a two-element array at the beginning of the command, the first element is the command to be executed, and the second argument is used as the <code>argv[0]</code> value, which may show up in process listings. In order to execute the command, one of the <code>exec(2)</code> system calls is used, so the running command may inherit some of the environment of the original program (including open file descriptors). This behavior is modified by env and options. See <code>spawn</code> for details. Raises SystemCallError if the command couldn't execute (typically <code>Errno::ENOENT</code> when it was not found). exec "echo *" # echoes list of files in current directory # never get here exec "echo", "*" # echoes an asterisk # never get here;F:@objectIu:YARD::StubProxyProcess.exec;F: @summary0:@ref_tags[�;[o:YARD::Tags::OverloadTag :@tag_nameI" overload;F: @text0;;:@types0:@signatureI"'exec([env,] command... [,options]);F;IC;"�;F;Iu;Process.exec;F;0;[�;[�: @allI"�;F;[[:[env,][,options]0;Iu;Process.exec;F;I"iReplaces the current process by running the given external _command_. _command..._ is one of following forms. commandline : command line string which is passed to the standard shell cmdname, arg1, ... : command name and one or more arguments (no shell) [cmdname, argv0], arg1, ... : command name, argv[0] and zero or more arguments (no shell) If single string is given as the command, it is taken as a command line that is subject to shell expansion before being executed. The standard shell means always <code>"/bin/sh"</code> on Unix-like systems, <code>ENV["RUBYSHELL"]</code> or <code>ENV["COMSPEC"]</code> on Windows NT series, and similar. If two or more +string+ given, the first is taken as a command name and the rest are passed as parameters to command with no shell expansion. If a two-element array at the beginning of the command, the first element is the command to be executed, and the second argument is used as the <code>argv[0]</code> value, which may show up in process listings. In order to execute the command, one of the <code>exec(2)</code> system calls is used, so the running command may inherit some of the environment of the original program (including open file descriptors). This behavior is modified by env and options. See <code>spawn</code> for details. Raises SystemCallError if the command couldn't execute (typically <code>Errno::ENOENT</code> when it was not found). exec "echo *" # echoes list of files in current directory # never get here exec "echo", "*" # echoes an asterisk # never get here @overload exec([env,] command... [,options]);F:@namespaceIu;Process;F:@docstring_extra0:@sourceI" /* * call-seq: * exec([env,] command... [,options]) * * Replaces the current process by running the given external _command_. * _command..._ is one of following forms. * * commandline : command line string which is passed to the standard shell * cmdname, arg1, ... : command name and one or more arguments (no shell) * [cmdname, argv0], arg1, ... : command name, argv[0] and zero or more arguments (no shell) * * If single string is given as the command, * it is taken as a command line that is subject to shell expansion before being executed. * * The standard shell means always <code>"/bin/sh"</code> on Unix-like systems, * <code>ENV["RUBYSHELL"]</code> or <code>ENV["COMSPEC"]</code> on Windows NT series, and * similar. * * If two or more +string+ given, * the first is taken as a command name and * the rest are passed as parameters to command with no shell expansion. * * If a two-element array at the beginning of the command, * the first element is the command to be executed, * and the second argument is used as the <code>argv[0]</code> value, * which may show up in process listings. * * In order to execute the command, one of the <code>exec(2)</code> * system calls is used, so the running command may inherit some of the environment * of the original program (including open file descriptors). * This behavior is modified by env and options. * See <code>spawn</code> for details. * * Raises SystemCallError if the command couldn't execute (typically * <code>Errno::ENOENT</code> when it was not found). * * exec "echo *" # echoes list of files in current directory * # never get here * * * exec "echo", "*" # echoes an asterisk * # never get here */ VALUE rb_f_exec(int argc, VALUE *argv) { struct rb_exec_arg earg; #define CHILD_ERRMSG_BUFLEN 80 char errmsg[CHILD_ERRMSG_BUFLEN] = { '\0' }; rb_exec_arg_init(argc, argv, TRUE, &earg); if (NIL_P(rb_ary_entry(earg.options, EXEC_OPTION_CLOSE_OTHERS))) rb_exec_arg_addopt(&earg, ID2SYM(rb_intern("close_others")), Qfalse); rb_exec_arg_fixup(&earg); rb_exec_err(&earg, errmsg, sizeof(errmsg)); if (errmsg[0]) rb_sys_fail(errmsg); rb_sys_fail(earg.prog); return Qnil; /* dummy */ };F