• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ut_process.h

Go to the documentation of this file.
00001 /* ut_process.h
00002  *
00003  * Copyright (C) 2002 AbiWord developers (see CREDITS.TXT for list).
00004  * Initially written by Kenneth J. Davis, I disclaim any copyright.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef UT_PROCESS_H
00023 #define UT_PROCESS_H
00024 
00025 
00026 /* include standard headers */
00027 #include <stddef.h>         /* NULL and other common definitions */
00028 #include <stdlib.h>
00029 #include <stdio.h>
00030 
00031 /* Note: sys/types.h should be included before sys/stat.h */
00032 #include <sys/types.h>
00033 #include <sys/stat.h>
00034 
00035 
00036 /* platform specific code */
00037 #include <unistd.h>
00038 #include <sys/wait.h>
00039 #include <signal.h>
00040 typedef pid_t ProcessInfo;          // process id on POSIX systems (UT_sint32)
00041 
00042 
00043 // returns true if process is still alive
00044 bool isProcessStillAlive(ProcessInfo &pI);
00045 // returns true if process successfully started, false otherwise
00046 bool createChildProcess(const char *app, const char *args, ProcessInfo *pI);
00047 // will [try to] kill the process if it is still running
00048 void endProcess(ProcessInfo &pI);
00049 
00050 
00051 #endif /* UT_PROCESS_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1