diff options
author | Craig Tiller <ctiller@google.com> | 2015-01-14 11:19:09 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-01-14 11:19:09 -0800 |
commit | 6d43445a1a72028442cadd4fafd16df363b1f1cf (patch) | |
tree | 1a08265225b2a2cc14ebf69ca11e5e44f97d6591 /test/core | |
parent | cc19464dd5d51f0f38771e997838f9ad9a9c06ff (diff) | |
parent | 29512b56d0d16bec59f95999afbabb0d6f6e4aab (diff) |
Merge github.com:google/grpc into api
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/util/test_config.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 1a8f1a5f49..94245d85bc 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -33,14 +33,28 @@ #include "test/core/util/test_config.h" +#include <grpc/support/port_platform.h> #include <stdlib.h> #include <signal.h> + +#if GPR_GETPID_IN_UNISTD_H #include <unistd.h> +static int seed() { + return getpid(); +} +#endif + +#if GPR_GETPID_IN_PROCESS_H +#include <process.h> +static int seed(void) { + return _getpid(); +} +#endif void grpc_test_init(int argc, char **argv) { /* disable SIGPIPE */ signal(SIGPIPE, SIG_IGN); /* seed rng with pid, so we don't end up with the same random numbers as a concurrently running test binary */ - srand(getpid()); + srand(seed()); } |