#include "fdset.h"
#define SERVER_FD_MAX 16
-#define TIMEOUT ((int) (10*MSEC_PER_SEC))
typedef struct Stream Stream;
/* Then, add process if set */
if (read_process(&buf, &iovec[i]) > 0)
i++;
- else if (ucred && get_process_name(ucred->pid, &process) >= 0)
+ else if (ucred &&
+ ucred->pid > 0 &&
+ get_process_name(ucred->pid, &process) >= 0)
IOVEC_SET_STRING(iovec[i++], process);
/* Skip the stored PID if we have a better one */
struct epoll_event event;
int k;
- if ((k = epoll_wait(server.epoll_fd, &event, 1, TIMEOUT)) < 0) {
+ if ((k = epoll_wait(server.epoll_fd, &event, 1, -1)) < 0) {
if (errno == EINTR)
continue;