00001 /***************************************************************** 00002 * gmerlin - a general purpose multimedia framework and applications 00003 * 00004 * Copyright (c) 2001 - 2011 Members of the Gmerlin project 00005 * gmerlin-general@lists.sourceforge.net 00006 * http://gmerlin.sourceforge.net 00007 * 00008 * This program is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 * *****************************************************************/ 00021 00032 typedef struct 00033 { 00034 int stdin_fd; 00035 int stdout_fd; 00036 int stderr_fd; 00037 00038 void * priv; 00039 } bg_subprocess_t; 00040 00051 bg_subprocess_t * bg_subprocess_create(const char * command, int do_stdin, 00052 int do_stdout, int do_stderr); 00053 00061 void bg_subprocess_kill(bg_subprocess_t* proc, int signal); 00062 00068 int bg_subprocess_close(bg_subprocess_t* proc); 00069 00078 int bg_subprocess_read_line(int fd, char ** ret, int * ret_alloc, 00079 int timeout); 00080 00091 int bg_subprocess_read_data(int fd, uint8_t * ret, int len); 00092