mirror of
https://github.com/tmux/tmux.git
synced 2025-12-07 23:12:39 +00:00
Sync OpenBSD patchset 468:
Move the poll registration functions into the server-*.c files.
This commit is contained in:
15
server-job.c
15
server-job.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user