Bash-4.4 distribution sources and documentation
This commit is contained in:
parent
30a978b7d8
commit
a0c0a00fc4
588 changed files with 130746 additions and 80164 deletions
|
|
@ -5,7 +5,13 @@
|
|||
* Then, from within bash, enable -f ./mypid enable_mypid, where ./mypid
|
||||
* is the binary obtained from running make. Hereafter, `${MYPID}'
|
||||
* is a shell builtin variable.
|
||||
*
|
||||
* This defines an unload hook function that is called when the builtin is
|
||||
* deleted with enable -d that will unbind the MYPID variable so future
|
||||
* references to it do not attempt to access memory that is no longer part
|
||||
* of this process's address space.
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
|
@ -17,8 +23,11 @@
|
|||
#define INIT_DYNAMIC_VAR(var, val, gfunc, afunc) \
|
||||
do \
|
||||
{ SHELL_VAR *v = bind_variable (var, (val), 0); \
|
||||
v->dynamic_value = gfunc; \
|
||||
v->assign_func = afunc; \
|
||||
if (v) \
|
||||
{ \
|
||||
v->dynamic_value = gfunc; \
|
||||
v->assign_func = afunc; \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
|
@ -56,6 +65,12 @@ enable_mypid_builtin(WORD_LIST *list)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
enable_mypid_builtin_unload (char *s)
|
||||
{
|
||||
unbind_variable ("MYPID");
|
||||
}
|
||||
|
||||
char const *enable_mypid_doc[] = {
|
||||
"Enable $MYPID.",
|
||||
"",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue