1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
kosaki 2011-05-14 10:51:16 +00:00
parent 3ad44e0aa1
commit 1780714844
2 changed files with 6 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Sat May 14 19:50:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* missing/setproctitle.c (compat_init_setproctitle): use
ruby_strdup() instead of strdup().
Sat May 14 19:37:31 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* include/ruby/missing.h: add setproctitle() declaration.

View file

@ -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 */
}