示例#1
0
int subprocess_io_complete (struct subprocess *p)
{
    if (p->io_cb) {
        if (zio_closed (p->zio_out) && zio_closed (p->zio_err))
            return 1;
        return 0;
    }
    return 1;
}
示例#2
0
文件: zio.c 项目: surajpkn/flux-core
static int zio_write_pending (zio_t *zio)
{
    if (zio_closed (zio))
        return (0);

    if ((zio_buffer_used (zio) > 0) || zio_eof (zio))
        return (1);

    return (0);
}
示例#3
0
文件: zio.c 项目: surajpkn/flux-core
static int zio_eof_pending (zio_t *zio)
{
    /* Already closed? Then EOF can't be pending */
    if (zio_closed (zio))
      return (0);
    /*
     *   zio object has EOF pending if EOF flag is set and either the
     *    io is unbuffered or the buffer for IO is empty.
     */
    return (zio_eof (zio) && (!cbuf_used (zio->buf)));
}