Unify signal handling in C

pull/34/head
Craig Tiller 10 years ago
parent bf444937c6
commit 5c35008ea1
  1. 3
      test/core/iomgr/tcp_posix_test.c
  2. 3
      test/core/transport/chttp2_transport_end2end_test.c
  3. 3
      test/core/util/test_config.c

@ -36,7 +36,6 @@
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>
@ -491,8 +490,6 @@ static grpc_endpoint_test_config configs[] = {
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_iomgr_init();
/* disable SIGPIPE */
signal(SIGPIPE, SIG_IGN);
run_tests();
grpc_endpoint_tests(configs[0]);
grpc_iomgr_shutdown();

@ -107,9 +107,6 @@ grpc_transport_test_config fixture_configs[] = {
int main(int argc, char **argv) {
size_t i;
/* disable SIGPIPE */
signal(SIGPIPE, SIG_IGN);
grpc_test_init(argc, argv);
grpc_iomgr_init();

@ -34,9 +34,12 @@
#include "test/core/util/test_config.h"
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
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());

Loading…
Cancel
Save