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

ruby-changes:10538

From: azav <ko1@a...>
Date: Fri, 6 Feb 2009 21:54:58 +0900 (JST)
Subject: [ruby-changes:10538] Ruby:r22092 (trunk): Created execl stub as a missing PIPS function

azav	2009-02-06 21:54:52 +0900 (Fri, 06 Feb 2009)

  New Revision: 22092

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

  Log:
    Created execl stub as a missing PIPS function

  Modified files:
    trunk/process.c
    trunk/symbian/missing-pips.c

Index: symbian/missing-pips.c
===================================================================
--- symbian/missing-pips.c	(revision 22091)
+++ symbian/missing-pips.c	(revision 22092)
@@ -1,4 +1,3 @@
-//#include "symbian.h"
 #include <sys/signal.h>
 #include <sys/resource.h>
 #include <fcntl.h>
@@ -15,6 +14,7 @@
 int raise(int sig);
 int kill(pid_t pid, int sig);
 int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset);
+int execl(const char *path, const char *arg0, ... /*, (char *)0 */);
 int execv(const char *path, char *const argv[]);
 int pthread_kill(pthread_t thread, int sig);
 
@@ -53,6 +53,11 @@
 	return -1;
 }
 
+int execl(const char *path, const char *arg0, ...)
+{
+	return 0;
+}
+
 int execv(const char *path, char *const argv[])
 {
 	return 0;
Index: process.c
===================================================================
--- process.c	(revision 22091)
+++ process.c	(revision 22092)
@@ -1097,9 +1097,7 @@
 		exit(status);
 #else
 	    before_exec();
-#ifndef __SYMBIAN32__	    
 	    execl("/bin/sh", "sh", "-c", str, (char *)NULL);
-#endif	    
 	    preserving_errno(after_exec());
 #endif
 	    return -1;
@@ -1735,8 +1733,8 @@
  *  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 
+ *  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.
@@ -2674,12 +2672,12 @@
  *     exit(integer=0)
  *     Kernel::exit(integer=0)
  *     Process::exit(integer=0)
- *  
+ *
  *  Initiates the termination of the Ruby script by raising the
  *  <code>SystemExit</code> exception. This exception may be caught. The
  *  optional parameter is used to return a status code to the invoking
  *  environment.
- *     
+ *
  *     begin
  *       exit
  *       puts "never get here"
@@ -2687,22 +2685,22 @@
  *       puts "rescued a SystemExit exception"
  *     end
  *     puts "after begin block"
- *     
+ *
  *  <em>produces:</em>
- *     
+ *
  *     rescued a SystemExit exception
  *     after begin block
- *     
+ *
  *  Just prior to termination, Ruby executes any <code>at_exit</code> functions
  *  (see Kernel::at_exit) and runs any object finalizers (see
  *  ObjectSpace::define_finalizer).
- *     
+ *
  *     at_exit { puts "at_exit function" }
  *     ObjectSpace.define_finalizer("string",  proc { puts "in finalizer" })
  *     exit
- *     
+ *
  *  <em>produces:</em>
- *     
+ *
  *     at_exit function
  *     in finalizer
  */
@@ -2744,7 +2742,7 @@
  *     abort
  *     Kernel::abort
  *     Process::abort
- *  
+ *
  *  Terminate execution immediately, effectively by calling
  *  <code>Kernel.exit(1)</code>. If _msg_ is given, it is written
  *  to STDERR prior to terminating.
@@ -2969,7 +2967,7 @@
  *        :unsetenv_others => false  : don't clear (default)
  *      process group:
  *        :pgroup => true or 0 : process leader
- *        :pgroup => pgid      : join to specified process group 
+ *        :pgroup => pgid      : join to specified process group
  *      resource limit: resourcename is core, cpu, data, etc.  See Process.setrlimit.
  *        :rlimit_resourcename => limit
  *        :rlimit_resourcename => [cur_limit, max_limit]
@@ -3009,7 +3007,7 @@
  *  If a hash is given as +options+,
  *  it specifies
  *  process group,
- *  resource limit, 
+ *  resource limit,
  *  current directory,
  *  umask and
  *  redirects for the child process.
@@ -3071,7 +3069,7 @@
  *  So it is inherited from the parent process.
  *
  *  The standard input stream (stdin) can be specifed by :in, 0 and STDIN.
- *  
+ *
  *  A filename can be specified as a hash value.
  *
  *    pid = spawn(command, :in=>"/dev/null") # read mode

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

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