njn | f39e9a3 | 2005-06-12 02:43:17 +0000 | [diff] [blame] | 1 | |
| 2 | /*--------------------------------------------------------------------*/ |
| 3 | /*--- Process-related libc stuff. pub_core_libcproc.h ---*/ |
| 4 | /*--------------------------------------------------------------------*/ |
| 5 | |
| 6 | /* |
| 7 | This file is part of Valgrind, a dynamic binary instrumentation |
| 8 | framework. |
| 9 | |
| 10 | Copyright (C) 2000-2005 Julian Seward |
| 11 | jseward@acm.org |
| 12 | |
| 13 | This program is free software; you can redistribute it and/or |
| 14 | modify it under the terms of the GNU General Public License as |
| 15 | published by the Free Software Foundation; either version 2 of the |
| 16 | License, or (at your option) any later version. |
| 17 | |
| 18 | This program is distributed in the hope that it will be useful, but |
| 19 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 21 | General Public License for more details. |
| 22 | |
| 23 | You should have received a copy of the GNU General Public License |
| 24 | along with this program; if not, write to the Free Software |
| 25 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
| 26 | 02111-1307, USA. |
| 27 | |
| 28 | The GNU General Public License is contained in the file COPYING. |
| 29 | */ |
| 30 | |
| 31 | #ifndef __PUB_CORE_LIBCPROC_H |
| 32 | #define __PUB_CORE_LIBCPROC_H |
| 33 | |
| 34 | //-------------------------------------------------------------------- |
| 35 | // PURPOSE: This module contains libc code related to the process. |
| 36 | // It's a bit of a mixed bag. |
| 37 | //-------------------------------------------------------------------- |
| 38 | |
| 39 | #include "pub_tool_libcproc.h" |
| 40 | |
njn | ed8b05d | 2005-06-12 20:51:09 +0000 | [diff] [blame] | 41 | /* The directory we look for all our auxillary files in. Useful for |
| 42 | running Valgrind out of a build tree without having to do "make install". */ |
njn | f39e9a3 | 2005-06-12 02:43:17 +0000 | [diff] [blame] | 43 | #define VALGRINDLIB "VALGRINDLIB" |
| 44 | |
| 45 | /* Additional command-line arguments; they are overridden by actual |
| 46 | command-line option. Each argument is separated by spaces. There |
| 47 | is no quoting mechanism. */ |
| 48 | #define VALGRINDOPTS "VALGRIND_OPTS" |
| 49 | |
| 50 | /* If this variable is present in the environment, then valgrind will |
| 51 | not parse the command line for options at all; all options come |
| 52 | from this variable. Arguments are terminated by ^A (\001). There |
| 53 | is no quoting mechanism. |
| 54 | |
| 55 | This variable is not expected to be set by anything other than |
| 56 | Valgrind itself, as part of its handling of execve with |
| 57 | --trace-children=yes. This variable should not be present in the |
| 58 | client environment. */ |
| 59 | #define VALGRINDCLO "_VALGRIND_CLO" |
| 60 | |
njn | 75b65aa | 2005-06-19 19:25:44 +0000 | [diff] [blame] | 61 | // Client's executable file descriptor. |
| 62 | extern Int VG_(clexecfd); |
| 63 | |
njn | f39e9a3 | 2005-06-12 02:43:17 +0000 | [diff] [blame] | 64 | // Client's original rlimit data and rlimit stack |
| 65 | extern struct vki_rlimit VG_(client_rlimit_data); |
| 66 | extern struct vki_rlimit VG_(client_rlimit_stack); |
| 67 | |
| 68 | // Environment manipulations |
| 69 | extern Char **VG_(env_setenv) ( Char ***envp, const Char* varname, |
| 70 | const Char *val ); |
| 71 | extern void VG_(env_unsetenv) ( Char **env, const Char *varname ); |
| 72 | extern void VG_(env_remove_valgrind_env_stuff) ( Char** env ); |
| 73 | |
| 74 | // misc |
| 75 | extern Int VG_(poll)( struct vki_pollfd *, UInt nfds, Int timeout); |
| 76 | extern void VG_(nanosleep) ( struct vki_timespec * ); |
| 77 | |
| 78 | // atfork |
| 79 | typedef void (*vg_atfork_t)(ThreadId); |
njn | 310ed28 | 2005-06-26 15:11:37 +0000 | [diff] [blame^] | 80 | extern void VG_(atfork_child) ( vg_atfork_t child_action ); |
| 81 | extern void VG_(do_atfork_child) ( ThreadId tid ); |
njn | f39e9a3 | 2005-06-12 02:43:17 +0000 | [diff] [blame] | 82 | |
| 83 | #endif // __PUB_CORE_LIBCPROC_H |
| 84 | |
| 85 | /*--------------------------------------------------------------------*/ |
| 86 | /*--- end ---*/ |
| 87 | /*--------------------------------------------------------------------*/ |