Commit 8164a5f4 authored by Eric Coissac's avatar Eric Coissac

Add doc for the new signal module

parent d355a78e
......@@ -8,10 +8,10 @@ sourced in your script or directly from the interactive shell if you want
to use the functionalities of the LECA Bash Library from your interactive
session.
For activating the *LECA Bash Library* you must source the `util.sh` bash script.
For activating the *LECA Bash Library* you must source the `lecabashlib.sh` bash script.
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
```
once activated modules can be loaded using the `include` command.
......@@ -31,6 +31,15 @@ reload several time the same module. To force the reloading of a module, use the
The module is reloaded with all its dependancies. A logging message advertise the
name of each reloaded module.
You can specify alternative place where to look for non standard modules by setting
the `LECABASHLIB_PATH` environment variable. If several paths have to be declared, you
must separate them using colon
```{shell}
> export LECABASHLIB_PATH="/new/path/1:/new/path/2:${LECABASHLIB_PATH}"
```
----------------------------------------------------------
# Modules provided by the *LECA Bash Library*
......@@ -44,6 +53,7 @@ name of each reloaded module.
- **[logging](#logging)** : adds functionnalities for managing log files and log levels
- **[mutex](#mutex)** : manages concurent access to resources through locks and semaphores
- **[sets](#sets)** : manages *set* of values
- **[signal](#signal)** : manages signal handler functions
- **[stacks](#stacks)** : manages *stacks* of values
- **[tempdir](#tempdir)** : manages the creation of temporary directories and their erasements
- **[timeout](#timeout)** : provides a function for limiting the maximum execution time of a command
......@@ -58,7 +68,7 @@ name of each reloaded module.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include atexit
```
......@@ -87,7 +97,7 @@ empty one using a UNIX redirection.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include clobber
```
......@@ -177,7 +187,7 @@ Alias for the `popclobber` function. Using one of the both commands `popnoclobbe
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include download
```
......@@ -232,7 +242,7 @@ exiting in error.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include ifs
```
......@@ -263,7 +273,7 @@ where LECA ressources are stored on the LUKE cluster.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include lecaluke
```
......@@ -307,7 +317,7 @@ Therefore only `WARNING` and `ERROR` messages will be actually logged.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include logging
```
......@@ -385,7 +395,7 @@ Closes the current logfile and redirect the logging to stderr.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include mutex
```
......@@ -437,7 +447,7 @@ Closes the current logfile and redirect the logging to stderr.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include sets
```
......@@ -486,6 +496,32 @@ Closes the current logfile and redirect the logging to stderr.
setintersec <SETNAME1> <SETNAME2> <DESTINATION>
```
----------------------------------------------------------
## signal
### Activating the module
```{shell}
> source $LECABASHHOME/lecabashlib.sh
> include signal
```
### Functions provided:
#### registertrap
```{shell}
registertrap <SIGNAME> <COMMAND>
```
#### run
```{shell}
run <SIGNAME1> <SIGNAME1> <COMMAND>
```
----------------------------------------------------------
......@@ -494,7 +530,7 @@ Closes the current logfile and redirect the logging to stderr.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include stacks
```
......@@ -545,7 +581,7 @@ and the return status is set to *1* instead of *0* usually.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include tempdir
```
......@@ -583,7 +619,7 @@ and the return status is set to *1* instead of *0* usually.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include timeout
```
......@@ -600,7 +636,7 @@ and the return status is set to *1* instead of *0* usually.
### Activating the module
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include path
### Functions provided:
......@@ -625,7 +661,7 @@ The *irods* module define a set of function wrapping the classical `iput` and
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include irods
```
......@@ -686,7 +722,7 @@ count is reached.
### Activating the module
```{shell}
> source $LECABASHHOME/utils.sh
> source $LECABASHHOME/lecabashlib.sh
> include xml
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment