Sync OpenBSD patchset 468:

Move the poll registration functions into the server-*.c files.
This commit is contained in:
Tiago Cunha
2009-10-28 23:14:15 +00:00
parent a5acabd923
commit f4514f5c60
5 changed files with 89 additions and 92 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: server-job.c,v 1.1 2009-10-23 17:49:47 tcunha Exp $ */
/* $Id: server-job.c,v 1.2 2009-10-28 23:14:15 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -22,6 +22,19 @@
#include "tmux.h"
/* Register jobs for poll. */
void
server_job_prepare(void)
{
struct job *job;
SLIST_FOREACH(job, &all_jobs, lentry) {
if (job->fd == -1)
continue;
server_poll_add(job->fd, POLLIN, server_job_callback, job);
}
}
/* Process a single job event. */
void
server_job_callback(int fd, int events, void *data)