~clint-fewbar/gearmand/fix-postgresql-path

« back to all changes in this revision

Viewing changes to libgearman/kill.cc

merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <config.h>
40
40
#include <libgearman/common.h>
41
41
#include <cerrno>
 
42
#include <cstring>
42
43
#include <unistd.h>
43
44
 
44
45
gearman_id_t gearman_id_initialize(void)
84
85
  case GEARMAN_SIGNAL_CHECK:
85
86
    {
86
87
      struct pollfd pfds[1];
 
88
      memset(&pfds, 0, sizeof(pfds));
87
89
      pfds[0].fd= handle.read_fd;
88
90
      pfds[0].events= POLLIN;
89
91
      pfds[0].revents= 0;
90
 
      char buffer[1];
91
92
 
92
93
      int ret= ::poll(pfds, sizeof(pfds), 1500);
93
94
 
95
96
      {
96
97
        return GEARMAN_SUCCESS;
97
98
      }
98
 
 
99
 
      return GEARMAN_COULD_NOT_CONNECT;
100
99
    }
 
100
    break;
101
101
  }
102
102
 
103
103
  return GEARMAN_COULD_NOT_CONNECT;