Move the poll registration functions into the server-*.c files.

This commit is contained in:
Nicholas Marriott
2009-10-27 13:03:33 +00:00
parent ed62d1263c
commit 37ffdff5ba
5 changed files with 84 additions and 87 deletions

View File

@ -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)