aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
2023-10-28Update autotools requirements. Upgrade gnulib and grecs.HEADmasterSergey Poznyakoff9
2023-07-30Version 1.18.90Sergey Poznyakoff3
2023-07-29Accept negated status codes and signal numbers in return-codeSergey Poznyakoff5
* doc/pies.texi: Document changes. * src/inetd.c (listel_dispose): Remove static qualifier. * src/pies.h (status_cond): New struct. (action): Replace nstat, status with cond_list. (listel_dispose): New prototype. * src/pies.c (action_free): Free cond_list. (create_action): Rewrite. * src/progman.c (status_matches_p): Rewrite.
2023-03-16BugfixSergey Poznyakoff1
* src/progman.c (progman_stop): Fix waiting for shutdown components loop.
2023-01-22Update copyright yearsSergey Poznyakoff102
2022-09-06Fix typoSergey Poznyakoff1
2022-09-05Minor improvementSergey Poznyakoff1
* src/progman.c (progman_cleanup): As a precaution, react on events from active components.
2022-09-05BugfixesSergey Poznyakoff5
* lib/envop.c (envop_cmp): Fix coredump on name == NULL (eval statement in env). * lib/pp.c: Add missing include. * src/comp.c: Fix format conversions. * src/pies.c (main): Call gc early, so that old components are stopped before starting new ones. Don't raise PIES_CHLD_WAKEUP. * src/progman.c (progman_gc): Call progman_cleanup before checking if any programs are left running. Fix format conversions.
2022-08-13Version 1.8release-1.8Sergey Poznyakoff3
2022-08-06Fix component shutdown.Sergey Poznyakoff13
* NEWS: Document changes. * doc/pies.texi: Document changes. * src/cmdline.opt: New option --list-shutdown-sequence * src/comp.c (compute_shutdown_sequence) (component_shutdown_list,components_list_shutdown_sequence) (components_shutdown_sequence_numbers): New functions. (component_config_commit): Compute shutdown sequences for each component. * src/pies.c: Handle the --list-shutdown-sequence option. * src/pies.h (component) <shutdown_seqno>: New field. (components_list_shutdown_sequence) (components_shutdown_sequence_numbers): New prototypes. * src/progman.c (progman_gc): Rewrite. (progman_stop): Rewrite. * tests/shdnseq.at: New test. * tests/sigwait.c: Take options -n and -f FILE. Open file in append mode. Lock it before writing. * tests/Makefile.am: Add new test. * tests/testsuite.at: Include new test.
2022-08-04Configurable termination signalSergey Poznyakoff11
* NEWS: Document changes. * doc/pies.texi: Document changes. * src/comp.c (component_create): Initialize sigterm field. * src/pies.h (component): New field: sigterm. * src/pies.c (strtosignum): New function. (create_action): Use strtosignum. (_cb_signal): New callback. (component_keywords): New keyword "sigterm". * src/progman.c (prog_sigterm): New function. (link_prog, progman_cleanup) (progman_stop_component): Use prog_sigterm. (print_status): Change semantics of expect_term: it means termination signal, if not 0. * tests/sigterm.at: New test. * tests/sigwait.c: New test program. * tests/Makefile.am: Add new test. (noinst_PROGRAMS): Add sigwait. * tests/testsuite.at: Include new test.
2022-07-07Version 1.7.92Sergey Poznyakoff2
2022-07-07Bugfix in REST APISergey Poznyakoff1
* src/ctl.c (input_append): Treat Content-Length: 0 correctly
2022-06-01Ctl API: use "message" attribute consistentlySergey Poznyakoff3
* grecs: update. * src/ctl.c: Use "message" everywhere. Remove all uses of "error_message" attribute. * src/piesctl.c (shttp_print_response_status): Special handling for empty responses.
2022-05-31Don't lose SIGCHLD handler during config reloadSergey Poznyakoff4
* NEWS: Update. * configure.ac: Version 1.7.91 * grecs: pull 2d75be5 * src/pies.c (main): Clear children_op flag immediately after testing it. The intent is to avoid accidentally clearing bits that might have been set when processing (in particular - PIES_CHLD_CLEANUP). Note, that this generalizes 3b52d3d8.
2022-03-13Fix piesctl config reloadSergey Poznyakoff1
* grecs: Pull 03874326
2022-01-24Remove spurious "info" messageSergey Poznyakoff1
2022-01-21Fallback log fileSergey Poznyakoff4
Fallback log file is a file where pies writes out of band log messages, i.e. messages about not being able to open syslog socket or send logs to it. Regular log messages are diverted to this file if syslog was requested, but cannot be used because of a permanent error. * configure.ac (FALLBACK_LOG): New configuration variable. Defines the location of the pies fallback log file. * src/Makefile.am (AM_CPPFLAGS): Define FALLBACK_LOG. * src/pies.c (syslog_kw): New configuration file statement: fallback-file. * src/syslog.c (pies_fallback_file): Initialize with FALLBACK_LOG. (reopen_logger): Fix diagnostic messages. Disable syslog if unable to connect to it and the error is permanent. (pies_syslog_flush): Use fallback log file if syslog socket is disabled.
2022-01-20BugfixSergey Poznyakoff1
* src/pies.c (main): Reorder calls to progman_wake_sleeping and progman_recompute_alarm according to their dependencies: the former may raise the PIES_CHLD_RESCHEDULE_ALARM, which should trigger the latter.
2022-01-20Upgrade grecs to 94e69c9570b (Fix preprocessor mode)Sergey Poznyakoff1
2022-01-18Upgrade grecs to 08f200da1cSergey Poznyakoff14
2022-01-17Minor fixSergey Poznyakoff1
* src/prog.h: Use unsigned for 1-bit field's type.
2022-01-17Fix configuration preprocessingSergey Poznyakoff6
* grecs: Upgrade to 03044f768f. * lib/pp.c (pp_add_option): Don't insert grecs_preprocessor at the begiinig yet. (pp_command_line): Insert grecs_preprocessor at the beginning of the resulting string. This way the --preprocessor option is honored even if it appears after any -I or -D options in the command line. * src/cmdline.opt (pies_help_hook): Remove unused variable. * configure.ac: Version 1.7.90. * NEWS: Update. * src/progman.c (prog_start): Minor unrelated fix
2022-01-12Upgrade grecs to 95ea130c00Sergey Poznyakoff1
2022-01-02Version 1.7release-1.7Sergey Poznyakoff2
2022-01-02Update copyright yearSergey Poznyakoff100
2021-07-19Use grecs 1569e6e3f73e5Sergey Poznyakoff3
* grecs: Pull 1569e6e3f73e5 * src/pies.c: Use grecs_preprocess for preprocessing * src/piesctl.c: Likewise.
2021-07-07Fix external cross-references in HTML outputSergey Poznyakoff3
2021-07-07Version 1.6release-1.6Sergey Poznyakoff2
2021-07-07Improve the docsSergey Poznyakoff1
* doc/pies.texi: Describe the use of xenv as a preprocessor.
2021-06-23Make sure exited preprocessor gets cleaned up when running with PID 1.Sergey Poznyakoff1
This restores the fix introduced by commit 5f2769a0 and inadvertently removed in 0b425c88. * src/pies.c (init_detect): Set up SIGCHLD no if pid is 1, no matter what the value of PIES_SYSVINIT_ENABLED.
2021-06-09Fix initialization of precious variables in configure.acSergey Poznyakoff1
2021-06-09Upgrade grecs to ebf9926Sergey Poznyakoff1
2021-06-09Make preprocessor include path configurable.Sergey Poznyakoff8
The installation directory for pp-setup can be set at configure time using the --with-pp-setup option. To disable installing it, use --without-pp-setup. * NEWS: Raise patchlevel. * configure.ac (DEFAULT_INCLUDE_PATH): New variable. (PIES_INCDIR): New substitution variable. New option --with-pp-setup. * grecs: Pull 7427077b98. * src/Makefile.am (DEFAULT_VERSION_INCLUDE_DIR) (DEFAULT_INCLUDE_DIR): Replace by DEFAULT_INCLUDE_PATH. Install pp-setup conditionally. * src/cmdline.opt (pies_help_hook): Print include path. Fix arguments to grecs_find_include_file. * src/pies.c (config_init): Use DEFAULT_INCLUDE_PATH to initialize include path. * src/piesctl.c: Likewise.
2021-06-07Minor fixSergey Poznyakoff1
* src/pies.c (init_detect): Set init_process to 0 if PIES_SYSVINIT_ENABLED is 0
2021-06-03Version 1.5.83Sergey Poznyakoff2
2021-06-03Fix reloading of the configuration files.Sergey Poznyakoff4
* lib/envop.c (environ_free): Free the env block itself. (envop_cmp): New function. * lib/envop.h (envop_cmp): New proto. * src/comp.c (argvcmp): Fix segmentation fault that occurred when both a and b were NULL. (component_match): Compare command, envop, and umask.
2021-05-09Version 1.5.92Sergey Poznyakoff2
2021-05-09When checking pidfile, ignore it if the reported pid equals getpid()Sergey Poznyakoff1
This is mainly to avoid failures on stale pidfiles when ruinning with PID 1 (init or docker entrypoint) and also for less-probable cases when starting with the same PID as the one stored in the stale pidfile.
2021-03-10Version 1.5.91Sergey Poznyakoff2
2021-03-09Fix docker autodetectionSergey Poznyakoff1
* src/pies.c (is_docker): Fix parsing of the /proc/self/cgroup file.
2021-02-12Fix preprocessor use and config file precedence in piesctlSergey Poznyakoff5
* NEWS: Document changes. * doc/pies.texi: Document changes. * src/cmdline.opt: Don't set preprocessor if DEFAULT_PREPROCESSOR is NULL. * src/piesctl-cl.opt: New options: --preprocessor, --no-preprocessor. * src/piesctl.c (parse_config): If either client.url or default_url is set in the program-specific config, use it and don't parse pies.conf. This is consistent with the documented behavior. (main): Initialize grecs_preprocessor.
2021-02-03External preprocessor can be selected when building the package and at runtime.Sergey Poznyakoff25
* configure.ac: Report selected preprocessor. Version 1.5.90. * doc/Makefile.am: Don't distribute gendocs.pl and gendocs_template * grecs: Upgrade. * lib/pp.c (pp_command_line): Use the grecs_preprocessor variable instead of DEFAULT_PREPROCESSOR macro. * src/cmdline.opt: New options: --preprocessor and --no-preprocessor. Report the preprocessor command and setup file when called with --help. * src/pies.c (config_init): Initialize grecs_preprocessor. * NEWS: Document changes. * doc/pies.texi: Document new options. * tests/accept.at: Invoke pies with --no-preprocessor. * tests/builtin.at: Likewise. * tests/control.at: Likewise. * tests/cyclic.at: Likewise. * tests/env.at: Likewise. * tests/envglobal.at: Likewise. * tests/expandenv.at: Likewise. * tests/inet.at: Likewise. * tests/maxinst.at: Likewise. * tests/passfd.at: Likewise. * tests/redirect.at: Likewise. * tests/respawn.at: Likewise. * tests/ret-exec.at: Likewise. * tests/ret-notify.at: Likewise. * tests/shell.at: Likewise. * tests/shutdown.at: Likewise. * tests/startup.at: Likewise.
2021-01-06Update copyright yearsSergey Poznyakoff101
2020-12-14Update .gitignoresSergey Poznyakoff1
2020-12-14Version 1.5release-1.5Sergey Poznyakoff4
2020-12-09Version 1.4.97Sergey Poznyakoff3
2020-12-09Emit explicit syslog marks when truncating very long messages.Sergey Poznyakoff1
* src/syslog.c (log_message): New field: trunc. (log_message_in_create): Initialize trunc (log_message_in_format): Raise trunc on buffer overflow. (log_message_enqueue): Emit the "message truncated" diagnostics when needed.
2020-12-09Fix handling of very long captured linesSergey Poznyakoff1
* src/progman.c (redirect_read): Break the loop if no newline is found.
2020-12-09Rework generation of the web docsSergey Poznyakoff8

Return to:

Send suggestions and report system problems to the System administrator.