> On May 20, 2015, 6:04 p.m., Timothy Chen wrote:
> > src/cli/mesos.cpp, line 22
> > <https://reviews.apache.org/r/34317/diff/1/?file=962095#file962095line22>
> >
> > optionally you can avoid the extra check by calling
> > os::getenv("PATH").get("")
I would guess that we can rely on PATH being set, but what if it's set and
empty? On my local machine, calling std::getenv on an environment variable that
has been set, but is empty, will return an empty char* which passes
(std::getenv("VAR") != NULL). Is this guaranteed to be the case on all
platforms? Since ('\0' == NULL) also passes on my machine, I'm curious if, in
the case of an empty PATH, some platforms might return an empty char* that
would pass (std::getenv("PATH") == NULL), and thus the resulting Option would
fail the assert(isSome()) in os::Option::get().
- Greg
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34317/#review84556
-----------------------------------------------------------
On May 17, 2015, 4:54 a.m., Greg Mann wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34317/
> -----------------------------------------------------------
>
> (Updated May 17, 2015, 4:54 a.m.)
>
>
> Review request for mesos.
>
>
> Bugs: MESOS-994
> https://issues.apache.org/jira/browse/MESOS-994
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Updated callers of os::getenv() in /src.
>
>
> Diffs
> -----
>
> src/cli/mesos.cpp 171a707cd2ba2348898e7fbe8fe9f0634edd6d86
> src/examples/balloon_framework.cpp c2337ba7ae00e5c59dfb3734d2f314c89687c4ad
> src/examples/docker_no_executor_framework.cpp
> df8b9109e15f6566f3f33428e8cf0014c520ea7b
> src/examples/load_generator_framework.cpp
> be1a3bf5f16bd811cb4039c8f15478183712a426
> src/examples/long_lived_framework.cpp
> d1d577e04be24b781ad279a06fc07611e2a0122b
> src/examples/low_level_scheduler_libprocess.cpp
> bee2e7ef8432cc42733260c668f1100c68f73b8d
> src/examples/low_level_scheduler_pthread.cpp
> fb8cd66c2e94270971184c1e3dcc92eccab8b223
> src/examples/no_executor_framework.cpp
> 37001c389f31f9f1dafe6d7f3eb17adc2e369057
> src/examples/test_framework.cpp 9f4b53e44e40709c01e34cdaa9d0a9ac57b7a768
> src/exec/exec.cpp a22e8bbf146983937e6fae00af601f9e886e88f1
> src/hdfs/hdfs.hpp 968545d9af896f3e72e156484cc58135405cef6b
> src/jvm/jvm.cpp d33a655dd46dc52f23905eb53de6530fa7b66a6c
> src/launcher/executor.cpp de6f1b104a765a8e53934154e78872b03695b24c
> src/launcher/fetcher.cpp 796526f59c25898ef6db2b828b0e2bb7b172ba25
> src/tests/anonymous_tests.cpp 12d4eb438c3d5f539ebf22bb159a98ef9141e224
>
> Diff: https://reviews.apache.org/r/34317/diff/
>
>
> Testing
> -------
>
> make check
>
>
> Thanks,
>
> Greg Mann
>
>