Сначала нужно export HTTP_PROXY
. Во-вторых, вам нужно внимательно прочитать man sudo
и обратить внимание на флаг -E
. Это работает:
$ export HTTP_PROXY=foof
$ sudo -E bash -c 'echo $HTTP_PROXY'
Вот цитата из справочной страницы:
-E, --preserve-env
Indicates to the security policy that the user wishes to preserve their
existing environment variables. The security policy may return an error
if the user does not have permission to preserve the environment.
Похоже, вам не хватает #include
- вот где TCP _...
определяет жить.
У меня под рукой нет коробки Solaris, только Linux.
grep -ri TCP_NODELAY /usr/include/*
приводит к:
/usr/include/linux/tcp.h:#define TCP_NODELAY 1 /* Turn off Nagle's algorithm. */
/usr/include/netinet/tcp.h:#define TCP_NODELAY 1 /* Don't delay send to coalesce packets */
Может, вы могли бы попробовать что-то подобное?