|
From: Daniel G. <dan...@ta...> - 2014-04-10 18:08:16
|
Hi,
POSIX does not require that shells pass the HOST or HOSTNAME to subshells.
Generally, calling to gethostname() instead is suggested.
In fact, there are some situations e.g. in Ubuntu where getenv("HOST")
returns null, so
vgdb and valgrind set "???" as the host in the pipe name. This may
cause name clashing
(since ? is a whildcard).
My attached patch replaces the use of getenv by gethostname.
vgdb works properly with this change.
However, I cannot link valgrind since the linker can't find gethostname.
This is the first time I try to contribute to valgrind, and noted that
many libc functions are
re-implemented.
Could somebody please tell me why I can't just use a function provided
in unistd.h,
and how I could overcome this?
Thanks!
Daniel.
--
Daniel F. Gutson
Chief Engineering Officer, SPD
San Lorenzo 47, 3rd Floor, Office 5
Córdoba, Argentina
Phone: +54 351 4217888 / +54 351 4218211
Skype: dgutson
|