Lines Matching refs:thepipe
36 static apr_status_t pipeblock(apr_file_t *thepipe)
41 fd_flags = fcntl(thepipe->filedes, F_GETFL, 0);
52 if (fcntl(thepipe->filedes, F_SETFL, fd_flags) == -1) {
59 if (ioctl(thepipe->filedes, FIONBIO, &on, sizeof(on)) < 0) {
68 thepipe->blocking = BLK_ON;
72 static apr_status_t pipenonblock(apr_file_t *thepipe)
75 int fd_flags = fcntl(thepipe->filedes, F_GETFL, 0);
87 if (fcntl(thepipe->filedes, F_SETFL, fd_flags) == -1) {
95 if (ioctl(thepipe->filedes, FIONBIO, &on, sizeof(on)) < 0) {
104 thepipe->blocking = BLK_OFF;
108 APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
110 if (thepipe->is_pipe == 1) {
111 thepipe->timeout = timeout;
113 if (thepipe->blocking != BLK_OFF) { /* blocking or unknown state */
114 return pipenonblock(thepipe);
118 if (thepipe->blocking != BLK_ON) { /* non-blocking or unknown state */
119 return pipeblock(thepipe);
127 APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
129 if (thepipe->is_pipe == 1) {
130 *timeout = thepipe->timeout;