diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-14 10:51:16 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-14 10:51:16 +0000 |
commit | 17807148446025ca1ad49a291edf0ea309a8e9d7 (patch) | |
tree | 645cf0a7ee635a2fe7c2193f41fc292052d09e61 /missing | |
parent | 3ad44e0aa18ff335cf110d8da11d92af82e2ad51 (diff) | |
download | ruby-17807148446025ca1ad49a291edf0ea309a8e9d7.tar.gz |
* missing/setproctitle.c (compat_init_setproctitle): use
ruby_strdup() instead of strdup().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r-- | missing/setproctitle.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/missing/setproctitle.c b/missing/setproctitle.c index 23b09d259b..8922d58ab6 100644 --- a/missing/setproctitle.c +++ b/missing/setproctitle.c @@ -110,12 +110,8 @@ compat_init_setproctitle(int argc, char *argv[]) argv_len = lastargv - argv[0]; argv_env_len = lastenvp - argv[0]; - /* - * Copy environment - * XXX - will truncate env on strdup fail - */ for (i = 0; envp[i] != NULL; i++) - environ[i] = strdup(envp[i]); + environ[i] = ruby_strdup(envp[i]); environ[i] = NULL; #endif /* SPT_REUSEARGV */ } |