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

ruby-changes:26783

From: nobu <ko1@a...>
Date: Tue, 15 Jan 2013 23:07:27 +0900 (JST)
Subject: [ruby-changes:26783] nobu:r38835 (trunk): io.c: no envp if no spawnve

nobu	2013-01-15 23:07:17 +0900 (Tue, 15 Jan 2013)

  New Revision: 38835

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

  Log:
    io.c: no envp if no spawnve
    
    * io.c (pipe_open): envp is not used if only spawnv is defined right
      now.

  Modified files:
    trunk/io.c

Index: io.c
===================================================================
--- io.c	(revision 38834)
+++ io.c	(revision 38835)
@@ -5663,7 +5663,9 @@ pipe_open(VALUE execarg_obj, const char https://github.com/ruby/ruby/blob/trunk/io.c#L5663
 # endif
 # if !defined(HAVE_FORK)
     char **args = NULL;
+#   if defined(HAVE_SPAWNVE)
     char **envp = NULL;
+#   endif
 # endif
 #endif
 #if !defined(HAVE_FORK)
@@ -5731,7 +5733,9 @@ pipe_open(VALUE execarg_obj, const char https://github.com/ruby/ruby/blob/trunk/io.c#L5733
 	pid = rb_fork_async_signal_safe(&status, popen_exec, &arg, arg.eargp->redirect_fds, errmsg, sizeof(errmsg));
 # else
 	rb_execarg_run_options(eargp, sargp, NULL, 0);
+#   if defined(HAVE_SPAWNVE)
 	if (eargp->envp_str) envp = (char **)RSTRING_PTR(eargp->envp_str);
+#   endif
 	while ((pid = DO_SPAWN(cmd, args, envp)) == -1) {
 	    /* exec failed */
 	    switch (e = errno) {

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

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