[前][次][番号順一覧][スレッド一覧]

ruby-changes:9024

From: akr <ko1@a...>
Date: Sat, 6 Dec 2008 00:10:22 +0900 (JST)
Subject: [ruby-changes:9024] Ruby:r20559 (trunk): rdoc udpate.

akr	2008-12-06 00:09:59 +0900 (Sat, 06 Dec 2008)

  New Revision: 20559

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20559

  Log:
    rdoc udpate.

  Modified files:
    trunk/process.c

Index: process.c
===================================================================
--- process.c	(revision 20558)
+++ process.c	(revision 20559)
@@ -1712,25 +1712,34 @@
 
 /*
  *  call-seq:
- *     exec([env,] command [, arg, ...] [,options])
+ *     exec([env,] command... [,options])
  *
  *  Replaces the current process by running the given external _command_.
- *  If optional arguments, sequence of +arg+, are not given, that argument is
- *  taken as a line that is subject to shell expansion before being
- *  executed. If one or more +arg+ given, they
- *  are passed as parameters to _command_ with no shell
- *  expansion. If +command+ is a two-element array, 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> 
+ *  _command..._ is one of following forms.
+ *
+ *    commandline                 : command line string which is passed to a shell
+ *    cmdname, arg1, ...          : command name and one or more arguments (no shell)
+ *    [cmdname, argv0], arg1, ... : command name and arguments including argv[0] (no shell)
+ *
+ *  If single string is given as the command,
+ *  it is taken as a line that is subject to shell expansion before being executed.
+ *
+ *  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).
- *
- *  The hash arguments, env and options, are same as
- *  <code>system</code> and <code>spawn</code>.
+ *  This behavior is modified by env and options.
  *  See <code>spawn</code> for details.
  *
- *  Raises SystemCallError if the _command_ couldn't execute (typically
+ *  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
@@ -2770,17 +2779,25 @@
 
 /*
  *  call-seq:
- *     system([env,] cmd [, arg, ...] [,options])    => true, false or nil
+ *     system([env,] command... [,options])    => true, false or nil
  *
- *  Executes _cmd_ in a subshell, returning +true+ if the command
- *  gives zero exit status, +false+ for non zero exit status. Returns
- *  +nil+ if command execution fails.  An error status is available in
- *  <code>$?</code>. The arguments are processed in the same way as
- *  for <code>Kernel::exec</code>.
+ *  Executes _command..._ in a subshell.
+ *  _command..._ is one of following forms.
  *
+ *    commandline                 : command line string which is passed to a shell
+ *    cmdname, arg1, ...          : command name and one or more arguments (no shell)
+ *    [cmdname, argv0], arg1, ... : command name and arguments including argv[0] (no shell)
+ *
+ *  system returns +true+ if the command gives zero exit status,
+ *  +false+ for non zero exit status.
+ *  Returns +nil+ if command execution fails.
+ *  An error status is available in <code>$?</code>.
+ *  The arguments are processed in the same way as
+ *  for <code>Kernel.spawn</code>.
+ *
  *  The hash arguments, env and options, are same as
  *  <code>exec</code> and <code>spawn</code>.
- *  See <code>spawn</code> for details.
+ *  See <code>Kernel.spawn</code> for details.
  *
  *     system("echo *")
  *     system("echo", "*")

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]