dtcm: Coverity 89670, 88380 and 88201
[oweals/cde.git] / cde / programs / dtprintinfo / util / Process.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: Process.h /main/4 1996/10/01 16:10:06 drk $ */
24 /*                                                                      *
25  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
26  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
27  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
28  * (c) Copyright 1993, 1994 Novell, Inc.                                *
29  */
30
31 #ifndef PROCESS_H
32 #define PROCESS_H
33
34 #include <sys/types.h>
35
36 class Process {
37
38    int NumProcs;
39    pid_t last_pid;
40    char **pprocs;
41    char *procs;
42    char *last_proc;
43    char *GetByPid(pid_t);
44    uid_t uid;
45    pid_t pid;
46    pid_t ppid;
47
48  public:
49
50    Process();
51    ~Process();
52
53    pid_t Parent(pid_t pid);
54    uid_t UID(pid_t pid);
55    char *Command(pid_t pid);
56 };
57
58 #endif // PROCESS_H