GNU Pies - News: Version 1.4
Version 1.4
Item posted by Sergey Poznyakoff <gray> on Tue Jul 2 14:02:06 2019.
Version 1.4 of GNU pies is available available for download.
New in this release:
New option --no-init
The --no-init option instructs pies not to switch to init mode if its PID is 1. Use this option if you run pies as a process manager in a
docker container.
New component modes: startup and shutdown
Startup components are run right after pies startup. Any other components start running only after last startup component has terminated.
Shutdown components are executed at program shutdown, after all other components have been terminated.
Any number of startup or shutdwon components can be defined in the configuration file. Such multiple components are run simultaneously,
unless required otherwise by their "prerequisites" and "dependents" statements.
New component flag: shell
The 'shell' flag instructs pies to run the component via "/bin/sh -c $command". Use it if the command should undergo variable expansion,
contains redirections, pipes, etc. E.g.
component X { flags shell; command "if [ -n \"$X\" ]; then foo; else bar; fi" }
New 'env' statement
The 'env' statement has been re-implemented as a compound statement. It can contain the following sub-statements:
clear
Clears the environment
keep NAME
Keeps the variable NAME when clearing the environment. Implies
"clear". NAME can be a globbing pattern, in which case all
variables matching the pattern are retained.
set "NAME=VALUE"
Sets the environment variable for the component. VALUE is subject
to variable expansion.
eval "VALUE"
Perform variable expansion on VALUE and discard the result (similar
to the shell ":" command). Useful for side effects, e.g.:
eval ${HOME:=/home/t}
unset NAME
Unsets the variable. NAME can be a globbing pattern, in which case all
variables matching the pattern are unset.
Example:
env { clear; keep PATH; keep MANPATH; keep "LC_*"; set "MANPATH=$MANPATH${MANPATH:+:}/usr/local/man"; }
Legacy 'env' statement
Support for the old one-line syntax of "env" is retained for
backward compatibility.
Previous versions applied unnecessary word splitting if given a
single argument. This is now fixed, so that e.g. the following
statement is processed correctly and defines a single variable
X to have the value "foo bar":
env "X=foo bar"
New environment variable available for commands started from return-code
Programs started via "exec" statement in the "return-code" block obtain the PID of the master pies process in environment variable
PIES_MASTER_PID.
Other changes
- Improved testsuite
- Improved cyclic dependency diagnostics
Comments:
No messages in Version 1.4