aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-12-07 11:36:10 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-12-07 12:05:16 +0200
commit5c0938830468b5829d3106a34456e85896201d1a (patch)
tree2de270e2827705c9a2072d1ab320679ee6017fd2
parentaa8d1b17e4b3c9425da865efe54fb621dcea5cd6 (diff)
downloadpies-5c0938830468b5829d3106a34456e85896201d1a.tar.gz
pies-5c0938830468b5829d3106a34456e85896201d1a.tar.bz2
Version 1.4.95
* NEWS: Version 1.4.95 * configure.ac: Likewise. * doc/ctl.texi: Fix formatting of JSON selectors. @deffn is unable to handle them properly. * doc/pies.texi: Minor changes. * src/progman.c (open_redirector): Minor change to avoid spurious varning. * src/syslog.c: Assume conservative value instead of unportable HOST_NAME_MAX.
-rw-r--r--NEWS4
-rw-r--r--configure.ac2
-rw-r--r--doc/ctl.texi41
-rw-r--r--doc/pies.texi6
-rw-r--r--src/progman.c5
-rw-r--r--src/syslog.c2
6 files changed, 26 insertions, 34 deletions
diff --git a/NEWS b/NEWS
index 775848e..d76412a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,10 @@
-GNU Pies NEWS -- history of user-visible changes. 2020-12-05
+GNU Pies NEWS -- history of user-visible changes. 2020-12-07
See the end of file for copying conditions.
Please send Pies bug reports to <bug-pies@gnu.org> or
<bug-pies@gnu.org.ua>
-Version 1.4.94 (git)
+Version 1.4.95 (git)
* Detect if pies is started from docker
diff --git a/configure.ac b/configure.ac
index 2d66e24..c1cddfd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
# along with GNU Pies. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ([2.63])
-AC_INIT([GNU Pies], [1.4.94], [bug-pies@gnu.org.ua])
+AC_INIT([GNU Pies], [1.4.95], [bug-pies@gnu.org.ua])
AC_CONFIG_SRCDIR([src/pies.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
diff --git a/doc/ctl.texi b/doc/ctl.texi
index 588cebe..dc226ae 100644
--- a/doc/ctl.texi
+++ b/doc/ctl.texi
@@ -136,54 +136,45 @@ applies operation defined by the request type to all of them.
Components are selected using a query in the form of JSON object
(a @dfn{selector}). Valid selectors are:
-@deffn {Selector} null
-@deffnx {Selector} false
+@table @samp
+@item null
+@itemx false
Matches nothing.
-@end deffn
-@deffn {Selector} true
+@item true
Matches all components.
-@end deffn
-@deffn {Selector} @{ "op": "component", "arg": @var{tag} @}
+@item @{ "op": "component", "arg": @var{tag} @}
Matches component with the given @var{tag} (@pxref{tag}).
-@end deffn
-@deffn {Selector} @{ "op": "type", "arg": "component" @}
+@item @{ "op": "type", "arg": "component" @}
Matches all components.
-@end deffn
-@deffn {Selector} @{ "op": "type", "arg": "command" @}
+@item @{ "op": "type", "arg": "command" @}
Matches all commands.
-@end deffn
-@deffn {Selector} @{ "op": "mode", "arg": @var{mode} @}
+@item @{ "op": "mode", "arg": @var{mode} @}
Matches all components with the given @var{mode}. @xref{component
mode}.
-@end deffn
-@deffn {Selector} @{ "op": "active" @}
+@item @{ "op": "active" @}
Matches all active components.
-@end deffn
-@deffn {Selector} @{ "op": "status", "arg": @var{status} @}
+@item @{ "op": "status", "arg": @var{status} @}
Matches all components with the given @var{status} (one of
@samp{stopped}, @samp{running}, @samp{listener}, @samp{sleeping},
@samp{stopping}, @samp{finished}). @xref{component status} for a
discussion of these values.
-@end deffn
-@deffn {Selector} @{ "op: "not", "arg": @var{condition} @}
+@item @{ "op: "not", "arg": @var{condition} @}
Negates @var{condition}, which is any valid selector.
-@end deffn
-@deffn {Selector} @{ "op": "and", "arg": @var{array} @}
+@item @{ "op": "and", "arg": @var{array} @}
Returns the result of logical conjunction on the @var{array} of selectors.
-@end deffn
-@deffn {Selector} @{ "op": "or", "arg": @var{array} @}
+@item @{ "op": "or", "arg": @var{array} @}
Returns the result of logical disjunction on the @var{array} of selectors.
-@end deffn
+@end table
For example, the following selector matches all components that are
in @samp{running} state, excepting components of @samp{inetd} mode:
@@ -298,7 +289,7 @@ Stop components matched by the @var{selector}. On success returns:
On failure, returns
@example
-@{ "status":"ER", "error_message": @var{text} @}
+@{ "status":"ER", "message": @var{text} @}
@end example
@noindent
@@ -424,7 +415,7 @@ On error, a 403 response is returned. In both cases, the response
body is the usual @command{pies} diagnostics object:
@example
-@{ "status":"ER", "error_message":@var{text} @}
+@{ "status":"ER", "message":@var{text} @}
@end example
@end deffn
diff --git a/doc/pies.texi b/doc/pies.texi
index 502b513..aeb287f 100644
--- a/doc/pies.texi
+++ b/doc/pies.texi
@@ -93,7 +93,7 @@ Appendices
* inetd configuration:: @file{Inetd.conf} Format.
* User-Group ACLs::
-* REST API::
+* Control API::
* Copying This Manual:: The GNU Free Documentation License.
* Concept Index:: Index of Concepts.
@@ -4520,8 +4520,8 @@ line options used).
@appendix User-Group ACLs
@include usr-acl.texi
-@node REST API
-@appendix REST API
+@node Control API
+@appendix Control API
@include ctl.texi
@node Copying This Manual
diff --git a/src/progman.c b/src/progman.c
index d808010..e71d86d 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -448,8 +448,8 @@ open_redirector (struct prog *master, int stream, int *fd)
{
case redir_null:
*fd = -1;
- return -1;
-
+ break;
+
case redir_file:
*fd = -1;
return redirect_to_file (master, stream);
@@ -457,6 +457,7 @@ open_redirector (struct prog *master, int stream, int *fd)
case redir_syslog:
return redirect_to_syslog (master, stream, fd);
}
+ return -1;
}
diff --git a/src/syslog.c b/src/syslog.c
index 7f748d6..36f9473 100644
--- a/src/syslog.c
+++ b/src/syslog.c
@@ -219,7 +219,7 @@ log_message_in_format (struct log_message_in *msg,
pid_t pid)
{
char tbuf[sizeof ("Jan 1 00:00:00")];
- char hostbuf[HOST_NAME_MAX+1];
+ char hostbuf[256];
struct timeval tv;
struct tm tm;

Return to:

Send suggestions and report system problems to the System administrator.