Added support for $pid_chroot
[monky] / src / proc.h
1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2  * vim: ts=4 sw=4 noet ai cindent syntax=c
3  *
4  * Conky, a system monitor, based on torsmo
5  *
6  * Any original torsmo code is licensed under the BSD license
7  *
8  * All code written since the fork of torsmo is licensed under the GPL
9  *
10  * Please see COPYING for details
11  *
12  * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
13  * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
14  *   (see AUTHORS)
15  * All rights reserved.
16  *
17  * This program is free software: you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation, either version 3 of the License, or
20  * (at your option) any later version.
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25  * GNU General Public License for more details.
26  * You should have received a copy of the GNU General Public License
27  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
28  *
29  */
30
31 #define PROCDIR "/proc"
32 #define READERR "Can't read '%s'"
33
34 struct environ_data {
35         char *file;
36         char *var;
37 };
38
39 void scan_pid_chroot_arg(struct text_object *obj, const char *arg, void* free_at_crash);
40 void print_pid_chroot(struct text_object *obj, char *p, int p_max_size);
41
42 void scan_pid_cmdline_arg(struct text_object *obj, const char *arg, void* free_at_crash);
43 void print_pid_cmdline(struct text_object *obj, char *p, int p_max_size);
44
45 void scan_pid_cwd_arg(struct text_object *obj, const char *arg, void* free_at_crash);
46 void print_pid_cwd(struct text_object *obj, char *p, int p_max_size);
47
48 void scan_pid_environ_arg(struct text_object *obj, const char *arg, void* free_at_crash);
49 void print_pid_environ(struct text_object *obj, char *p, int p_max_size);
50
51 void free_pid_environ(struct text_object *obj);
52
53 void scan_pid_environ_list_arg(struct text_object *obj, const char *arg, void* free_at_crash);
54 void print_pid_environ_list(struct text_object *obj, char *p, int p_max_size);
55
56 void scan_pid_exe_arg(struct text_object *obj, const char *arg, void* free_at_crash);
57 void print_pid_exe(struct text_object *obj, char *p, int p_max_size);
58
59 void scan_pid_stderr_arg(struct text_object *obj, const char *arg, void* free_at_crash);
60 void print_pid_stderr(struct text_object *obj, char *p, int p_max_size);
61
62 void scan_pid_stdin_arg(struct text_object *obj, const char *arg, void* free_at_crash);
63 void print_pid_stdin(struct text_object *obj, char *p, int p_max_size);
64
65 void scan_pid_stdout_arg(struct text_object *obj, const char *arg, void* free_at_crash);
66 void print_pid_stdout(struct text_object *obj, char *p, int p_max_size);
67
68 void scan_pid_openfiles_arg(struct text_object *obj, const char *arg, void* free_at_crash);
69 void print_pid_openfiles(struct text_object *obj, char *p, int p_max_size);