Lines Matching refs:foreground_fd
67 int foreground_fd;
283 context->foreground_fd = -1;
326 if (type == OPENVPN_PLUGIN_UP && context->foreground_fd == -1) /* fork off a process to hold onto root */
368 context->foreground_fd = fd[0];
395 else if (type == OPENVPN_PLUGIN_DOWN && context->foreground_fd >= 0)
397 if (send_control (context->foreground_fd, COMMAND_RUN_SCRIPT) == -1)
403 const int status = recv_control (context->foreground_fd);
421 if (context->foreground_fd >= 0)
424 if (send_control (context->foreground_fd, COMMAND_EXIT) == -1)
431 close (context->foreground_fd);
432 context->foreground_fd = -1;
443 if (context && context->foreground_fd >= 0)
446 send_control (context->foreground_fd, COMMAND_EXIT);
447 close (context->foreground_fd);
448 context->foreground_fd = -1;