Lines Matching refs:ioc
55 QIOChannelCommand *ioc; in qio_channel_command_new_pid() local
57 ioc = QIO_CHANNEL_COMMAND(object_new(TYPE_QIO_CHANNEL_COMMAND)); in qio_channel_command_new_pid()
59 ioc->readfd = readfd; in qio_channel_command_new_pid()
60 ioc->writefd = writefd; in qio_channel_command_new_pid()
61 ioc->pid = pid; in qio_channel_command_new_pid()
63 trace_qio_channel_command_new_pid(ioc, writefd, readfd, in qio_channel_command_new_pid()
70 return ioc; in qio_channel_command_new_pid()
99 static int qio_channel_command_abort(QIOChannelCommand *ioc, in qio_channel_command_abort() argument
110 trace_qio_channel_command_abort(ioc, ioc->pid); in qio_channel_command_abort()
111 ret = waitpid(ioc->pid, &status, WNOHANG); in qio_channel_command_abort()
112 trace_qio_channel_command_wait(ioc, ioc->pid, ret, status); in qio_channel_command_abort()
119 (unsigned long long)ioc->pid); in qio_channel_command_abort()
124 kill(ioc->pid, SIGTERM); in qio_channel_command_abort()
126 kill(ioc->pid, SIGKILL); in qio_channel_command_abort()
130 (unsigned long long)ioc->pid); in qio_channel_command_abort()
141 static int qio_channel_command_abort(QIOChannelCommand *ioc, in qio_channel_command_abort() argument
146 TerminateProcess(ioc->pid, 0); in qio_channel_command_abort()
147 ret = WaitForSingleObject(ioc->pid, 1000); in qio_channel_command_abort()
151 (unsigned long long)GetProcessId(ioc->pid)); in qio_channel_command_abort()
162 QIOChannelCommand *ioc = QIO_CHANNEL_COMMAND(obj); in qio_channel_command_init() local
163 ioc->readfd = -1; in qio_channel_command_init()
164 ioc->writefd = -1; in qio_channel_command_init()
165 ioc->pid = 0; in qio_channel_command_init()
170 QIOChannelCommand *ioc = QIO_CHANNEL_COMMAND(obj); in qio_channel_command_finalize() local
171 if (ioc->readfd != -1) { in qio_channel_command_finalize()
172 close(ioc->readfd); in qio_channel_command_finalize()
174 if (ioc->writefd != -1 && in qio_channel_command_finalize()
175 ioc->writefd != ioc->readfd) { in qio_channel_command_finalize()
176 close(ioc->writefd); in qio_channel_command_finalize()
178 ioc->writefd = ioc->readfd = -1; in qio_channel_command_finalize()
179 if (ioc->pid > 0) { in qio_channel_command_finalize()
180 qio_channel_command_abort(ioc, NULL); in qio_channel_command_finalize()
181 g_spawn_close_pid(ioc->pid); in qio_channel_command_finalize()
202 static ssize_t qio_channel_command_readv(QIOChannel *ioc, in qio_channel_command_readv() argument
210 QIOChannelCommand *cioc = QIO_CHANNEL_COMMAND(ioc); in qio_channel_command_readv()
237 static ssize_t qio_channel_command_writev(QIOChannel *ioc, in qio_channel_command_writev() argument
245 QIOChannelCommand *cioc = QIO_CHANNEL_COMMAND(ioc); in qio_channel_command_writev()
270 static int qio_channel_command_set_blocking(QIOChannel *ioc, in qio_channel_command_set_blocking() argument
274 QIOChannelCommand *cioc = QIO_CHANNEL_COMMAND(ioc); in qio_channel_command_set_blocking()
290 static int qio_channel_command_close(QIOChannel *ioc, in qio_channel_command_close() argument
293 QIOChannelCommand *cioc = QIO_CHANNEL_COMMAND(ioc); in qio_channel_command_close()
334 static void qio_channel_command_set_aio_fd_handler(QIOChannel *ioc, in qio_channel_command_set_aio_fd_handler() argument
341 QIOChannelCommand *cioc = QIO_CHANNEL_COMMAND(ioc); in qio_channel_command_set_aio_fd_handler()
349 static GSource *qio_channel_command_create_watch(QIOChannel *ioc, in qio_channel_command_create_watch() argument
352 QIOChannelCommand *cioc = QIO_CHANNEL_COMMAND(ioc); in qio_channel_command_create_watch()
353 return qio_channel_create_fd_pair_watch(ioc, in qio_channel_command_create_watch()