File: //usr/share/ri/3.0.0/system/Kernel/system-i.ri
U:RDoc::AnyMethod[iI"system:ETI"Kernel#system;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"*Executes _command..._ in a subshell. ;TI",_command..._ is one of following forms.;To:RDoc::Markup::BlankLine o:RDoc::Markup::List:
@type:
LABEL:@items[o:RDoc::Markup::ListItem:@label[I"<code>commandline</code>;T; [o;
; [I">command line string which is passed to the standard shell;To;;[I"$<code>cmdname, arg1, ...</code>;T; [o;
; [I"6command name and one or more arguments (no shell);To;;[I"-<code>[cmdname, argv0], arg1, ...</code>;T; [o;
; [I"Mcommand name, <code>argv[0]</code> and zero or more arguments (no shell);T@o;
; [ I"Bsystem returns +true+ if the command gives zero exit status, ;TI"'+false+ for non zero exit status. ;TI"/Returns +nil+ if command execution fails. ;TI"5An error status is available in <code>$?</code>.;T@o;
; [I"HIf the <code>exception: true</code> argument is passed, the method ;TI"?raises an exception instead of returning +false+ or +nil+.;T@o;
; [I"4The arguments are processed in the same way as ;TI"for Kernel#spawn.;T@o;
; [I"HThe hash arguments, env and options, are same as #exec and #spawn. ;TI""See Kernel#spawn for details.;T@o:RDoc::Markup::Verbatim; [I"system("echo *")
;TI"system("echo", "*")
;T:@format0o;
; [I"<em>produces:</em>;T@o;; [I"config.h main.rb
;TI"*
;T;0o;
; [I"Error handling:;T@o;; [I"#system("cat nonexistent.txt")
;TI"# => false
;TI"$system("catt nonexistent.txt")
;TI"# => nil
;TI"
;TI"4system("cat nonexistent.txt", exception: true)
;TI"6# RuntimeError (Command failed with exit 1: cat)
;TI"5system("catt nonexistent.txt", exception: true)
;TI"8# Errno::ENOENT (No such file or directory - catt)
;T;0o;
; [I",See Kernel#exec for the standard shell.;T:
@fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"Usystem([env,] command... [,options], exception: false) -> true, false or nil
;T0[ I"(*args);T@UFI"Kernel;TcRDoc::NormalModule00