1 2022-11-13 Colin Watson <cjwatson@debian.org>
5 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:7:5.
7 2022-11-13 Colin Watson <cjwatson@debian.org>
9 Make socketpair configure tests compatible with C23
11 K&R-style zero-argument function definitions will no longer be
14 * m4/pipeline-socketpair.m4 (PIPELINE_SOCKETPAIR_PIPE,
15 PIPELINE_SOCKETPAIR_MODE): Use `int main(void)`, not `int main()`.
16 * NEWS.md: Document this.
18 2022-08-12 Colin Watson <cjwatson@debian.org>
20 Update pre-commit hooks
22 * .pre-commit-config.yaml (pre-commit-hooks): Update to v4.3.0.
23 (clang-format): Update to v14.0.6.
25 2022-06-03 Colin Watson <cjwatson@debian.org>
27 Update manual page date
29 * man/libpipeline.3 (.Dd): Update to the date of the last substantial
30 modification. Leaving this as 2010 suggested more antiquity than we
33 2022-06-03 Colin Watson <cjwatson@debian.org>
37 * README.md: Use `https://libpipeline.gitlab.io/libpipeline/`.
38 * lib/libpipeline.pc.in (URL): Likewise.
40 2022-06-03 Colin Watson <cjwatson@debian.org>
42 web: Update last release
44 * web/index.html: Update to 1.5.6.
46 2022-06-03 Colin Watson <cjwatson@debian.org>
48 web: Fix last-modified date generation
50 * .gitlab-ci.yml: Replace `@DATE@` with the current date in
52 * web/index.html: Use `@DATE@` template.
54 2022-06-03 Colin Watson <cjwatson@debian.org>
56 web: Assorted URL updates
58 * web/index.html: Update Git URLs to GitLab. Chase various redirects
59 and/or switch to HTTPS. Remove old Savannah link.
61 2022-06-03 Colin Watson <cjwatson@debian.org>
65 * .gitlab-ci.yml (stages): Add deploy.
67 * web/index.html, web/libpipeline-lightning-talk.odp, web/standard.css,
68 web/white.css: New files.
70 2022-06-03 Colin Watson <cjwatson@debian.org>
72 Transferred Git repository to new group
74 * README.md: Change GitLab URL to
75 https://gitlab.com/libpipeline/libpipeline.
76 * NEWS.md: Document this.
78 2022-04-28 Colin Watson <cjwatson@debian.org>
80 Add notes to libpipeline(3) of when functions were added
82 * man/libpipeline.3 (DESCRIPTION, ENVIRONMENT): Add various "Added in"
84 * NEWS.md: Document this.
86 2022-04-23 Colin Watson <cjwatson@debian.org>
90 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:6:5.
92 2022-04-23 Colin Watson <cjwatson@debian.org>
94 gitlab-ci: Run tests with VERBOSE=1
96 This makes it easier to diagnose test failures.
98 * .gitlab-ci.yml (build-distcheck:script, build-out-of-tree:script): Set
101 2022-04-23 Colin Watson <cjwatson@debian.org>
103 Update pre-commit hooks
105 * .pre-commit-config.yaml (pre-commit-hooks): Update to v4.2.0.
106 (clang-format): Update to v14.0.1.
107 * lib/pipeline-private.h, lib/pipeline.h: Reformat enum definitions.
109 2022-04-23 Colin Watson <cjwatson@debian.org>
111 Fix handling of leading whitespace in argstr functions
113 Fixes Savannah bug #62355 (in man-db).
115 * lib/pipeline.c (argstr_get_word): Skip whitespace at the start of
116 words rather than at the end; leading whitespace otherwise resulted in
117 prematurely returning NULL.
118 * tests/argstr.c (test_argstr_excess_whitespace): New test.
119 (argstr_suite): Call test_argstr_excess_whitespace.
120 * NEWS.md: Document this.
122 2022-04-23 Colin Watson <cjwatson@debian.org>
124 Simplify static analysis of fatal errors
126 The usual idiom for fatal error reporting in libpipeline is `error
127 (FATAL, ...)` (there are a few cases using different exit codes, but
128 they're less common). Unfortunately, there's no easy way to tell the
129 compiler that this call doesn't return, because `error (0, ...)` *does*
130 return. As a result, some call sites required extra work to give the
131 compiler this information, which can sometimes make a difference to
134 To simplify this, add a new `fatal` helper function which always exits
135 `FATAL` (i.e. 2) and never returns. This is declared with
136 `PIPELINE_ATTR_NORETURN` so that the compiler can straightforwardly know
139 * bootstrap.conf (gnulib_modules): Add verror.
140 * lib/fatal.c, lib/fatal.h: New files.
141 * lib/Makefile.am (libpipeline_la_SOURCES): Add fatal.c and fatal.h.
143 * lib/pipeline.c (pipecmd_new_argstr, pipecmd_exec,
144 pipeline_install_sigchld, pipeline_start, pipeline_wait_all,
145 pipeline_pump): Use fatal.
147 2022-02-08 Colin Watson <cjwatson@debian.org>
149 Explicitly import Gnulib raise module
151 It was already implicitly included, but we explicitly use the raise
152 function in pipecmd_exec and pipeline_wait_all.
154 * bootstrap.conf (gnulib_modules): Add raise.
156 2022-01-16 Colin Watson <cjwatson@debian.org>
158 Update to Gnulib 20220116
160 * bootstrap: Sync to Gnulib 1eae0f7ea3c220d054025f2c9211700665f9f4a0.
161 * bootstrap.conf (GNULIB_REVISION): Set to
162 1eae0f7ea3c220d054025f2c9211700665f9f4a0.
164 2022-01-16 Colin Watson <cjwatson@debian.org>
166 Update pre-commit hooks
168 * .pre-commit-config.yaml (pre-commit-hooks): Update to v4.1.0.
170 2022-01-03 Colin Watson <cjwatson@debian.org>
174 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:5:5.
176 2022-01-03 Colin Watson <cjwatson@debian.org>
178 Document recent changes
180 * NEWS: Document changes since 1.5.4.
182 2022-01-03 Colin Watson <cjwatson@debian.org>
186 GitLab CI handles building releases now.
188 * release.sh: Remove.
189 * Makefile.am (EXTRA_DIST): Remove release.sh.
191 2022-01-03 Colin Watson <cjwatson@debian.org>
193 Add release automation
195 When a tag is pushed to GitLab, upload the bootstrapped source tarball
196 to the package registry, and create a release in GitLab associated with
199 * .gitlab-ci.yml (stages): Remove test, since it had no jobs. Add
201 (upload, release): New jobs.
203 2022-01-02 Colin Watson <cjwatson@debian.org>
205 Make NEWS.md list formatting more compact
207 2022-01-02 Colin Watson <cjwatson@debian.org>
209 Reformat release notes as Markdown
212 * NEWS.md: ... here. Reformat as Markdown.
213 * Makefile.am (dist_noinst_DATA): Replace NEWS with NEWS.md.
215 2022-01-02 Colin Watson <cjwatson@debian.org>
217 Remove superfluous quotes
219 * Makefile.am (gen_start_date): Remove superfluous quotes.
221 2022-01-02 Colin Watson <cjwatson@debian.org>
223 Trim down direct Gnulib dependencies slightly
225 * bootstrap.conf (gnulib_modules): Replace signal with signal-h, since
226 we use the corresponding header file directly but not the corresponding
229 2022-01-02 Colin Watson <cjwatson@debian.org>
231 Update to Gnulib 20211231
233 * bootstrap: Sync to Gnulib 14db2b71b5bd05b94ec6126617fd32cd5f1016cd.
234 * bootstrap.conf (GNULIB_REVISION): Set to
235 14db2b71b5bd05b94ec6126617fd32cd5f1016cd.
236 (--enable-gcc-warnings): New option, based on code in coreutils. Use
237 this to enable -fanalyzer only if --enable-gcc-warnings=expensive is
238 used; it's useful but slow.
240 2022-01-02 Colin Watson <cjwatson@debian.org>
242 Add build-distcheck CI artifact
244 This should eventually allow publishing release tarballs built by a CI
245 process rather than on my laptop.
247 * .gitlab-ci.yml (variables): Set GIT_DEPTH to 0; we need full history
248 in order to build the ChangeLog file.
249 (build-distcheck:before_script): Add git, needed by gitlog-to-changelog.
250 (build-distcheck:artifacts): Add bootstrapped/*.tar.gz.
252 2022-01-02 Colin Watson <cjwatson@debian.org>
254 Switch CI image to debian:unstable
256 This gives us newer versions of various dependencies such as the
259 * .gitlab-ci.yml (default:image): Switch from gcc to debian:unstable.
260 (pre-commit:before_script): Explicitly install git.
261 (bootstrap:before_script): Explicitly install git and pkg-config.
263 2022-01-01 Colin Watson <cjwatson@debian.org>
265 Use Gnulib attribute.h properly
267 We should be using public names rather than private ones.
269 * bootstrap.conf (gnulib_modules): Add attribute.
270 * lib/pipeline.c (pipecmd_get_nargs, pipeline_get_ncommands,
271 pipeline_get_command, pipeline_get_pid, pipeline_peek_size): Use
272 ATTRIBUTE_PURE rather than _GL_ATTRIBUTE_PURE.
274 2021-11-28 Colin Watson <cjwatson@debian.org>
276 Run pre-commit in GitLab CI
278 * .gitlab-ci.yml (stages): Add bootstrap.
279 (pre-commit): New job.
280 (bootstrap): Move to bootstrap stage.
282 2021-11-07 Colin Watson <cjwatson@debian.org>
286 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:4:5.
288 2021-11-07 Colin Watson <cjwatson@debian.org>
290 Ignore the "clang-format" commit for "git blame"
292 Developers should apply the following config setting:
294 git config blame.ignoreRevsFile .git-blame-ignore-revs
296 2021-11-07 Colin Watson <cjwatson@debian.org>
298 Introduce clang-format
300 This relieves me of the cognitive burden of having to think about
301 trivial formatting details (especially when reviewing code from others,
302 but also for myself). In most cases the reformatted code is equivalent
303 or superior in terms of my preferred style to what I wrote myself; there
304 was one exception (in pipeline_dump) where I disabled formatting.
306 * .clang-format: New file.
307 * .pre-commit-config.yaml: Add clang-format hook.
308 * lib/*, tests/*: Reformat using clang-format.
310 2021-11-07 Colin Watson <cjwatson@debian.org>
312 Fix build warnings in tests
314 * tests/common.c (temp_dir_setup): Use ck_abort_msg rather than fail.
315 * tests/exec.c (test_exec_process, test_exec_function): Likewise.
316 * tests/read.c (test_read_long_line): Likewise.
317 * tests/redirect.c (test_redirect_files): Likewise.
319 2021-11-07 Colin Watson <cjwatson@debian.org>
323 * .pre-commit-config.yaml: New file.
324 * lib/appendstr.c, tests/pump.c: Remove trailing whitespace.
326 2021-11-07 Colin Watson <cjwatson@debian.org>
328 Simplify conditional SIGPIPE handling
330 * lib/pipeline.c (IS_SIGPIPE): New macro.
331 (pipecmd_exec, pipeline_wait_all): Use IS_SIGPIPE, thereby avoiding
332 needing to put parts of an if/else chain inside #ifdef.
334 2021-09-19 Colin Watson <cjwatson@debian.org>
336 Update some obsolete Autoconf macros
338 * configure.ac: Replace AC_GNU_SOURCE and AC_ISC_POSIX with
339 AC_USE_SYSTEM_EXTENSIONS. Replace AC_CONFIG_HEADER with
342 2021-09-19 Colin Watson <cjwatson@debian.org>
344 Stop using obsolete AC_TRY_RUN
346 This has been obsolete since Autoconf 2.55. Use its AC_RUN_IFELSE
349 * m4/pipeline-socketpair.m4 (PIPELINE_SOCKETPAIR_PIPE): Expand
350 AC_TRY_RUN calls using AC_RUN_IFELSE.
352 2021-06-05 Colin Watson <cjwatson@debian.org>
354 Update remaining HTTP URLs to HTTPS
356 * COPYING: Update from current contents of
357 https://www.gnu.org/licenses/gpl-3.0.txt (no substantive licensing
358 changes, only updated URLs).
359 * Makefile.am (ACLOCAL_AMFLAGS): Update URL in comment to use HTTPS.
360 * README.md (Installation): Update URLs for pkg-config and check.
361 (Note on GPL versions): Update GNU licence compatibility URL to use
363 * lib/pipeline.c (clearenv): Update dovecot reference; the old URL used
364 HTTP and had gone stale.
366 2020-11-25 Colin Watson <cjwatson@debian.org>
368 Upgrade to Gnulib 20201125
370 In line with Gnulib, we now require Autoconf 2.64.
372 * bootstrap: Sync to Gnulib f2a67f071d170920314c9a3b8de3e85259b4e010.
373 * bootstrap.conf (GNULIB_REVISION): Set to
374 f2a67f071d170920314c9a3b8de3e85259b4e010.
375 (buildreq): Bump required autoconf version to 2.64.
376 * configure.ac (AC_PREREQ): Bump to 2.64.
377 * NEWS: Document this.
379 2020-11-25 Colin Watson <cjwatson@debian.org>
381 NEWS: Document move to GitLab
383 2020-11-25 Colin Watson <cjwatson@debian.org>
387 * README: Move to ...
388 * README.md: ... here. Reformat as Markdown.
389 (Using the library): New section, mainly borrowed from the project
392 2020-11-25 Colin Watson <cjwatson@debian.org>
394 Document migration to GitLab
396 * README: Add link to GitLab repository.
397 (Bug reporting): New section.
399 2020-11-25 Colin Watson <cjwatson@debian.org>
403 2020-08-13 Colin Watson <cjwatson@debian.org>
407 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:3:5.
409 2020-08-03 Colin Watson <cjwatson@debian.org>
411 Port tests to the modern Check API
413 Fixes Savannah bug #58883.
415 * configure.ac: Test for check >= 0.9.10.
416 * tests/argstr.c, tests/basic.c, tests/exec.c, tests/inspect.c,
417 tests/pump.c, tests/read.c, tests/redirect.c: Replace uses of
418 fail_unless and fail_if with appropriate ck_assert_* calls. In most
419 cases these now use more specific equality etc. tests rather than just
420 passing arbitrary predicates.
421 * README: Document updated dependency.
422 * NEWS: Document this.
424 2020-07-04 Colin Watson <cjwatson@debian.org>
426 Fix handling of read/write errors
428 safe_read and safe_write return size_t and define SAFE_READ_ERROR and
429 SAFE_WRITE_ERROR as error return values. We had previously been
430 assigning their result to a signed value. As a result, whether
431 passthrough, pipeline_pump, and get_block would detect read/write errors
432 was implementation-defined.
434 * lib/pipeline.c (passthrough, get_block): Assign safe_read return value
435 to a size_t rather than a signed integer type, and check for
436 SAFE_READ_ERROR rather than negative values.
437 (pipeline_pump): Assign safe_write return value to a size_t rather than
438 an ssize_t, and check for SAFE_WRITE_ERROR rather than negative values.
439 * NEWS: Document this.
441 2020-01-01 Colin Watson <cjwatson@debian.org>
445 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:2:5.
446 * README: Update copyright dates.
448 2020-01-01 Colin Watson <cjwatson@debian.org>
450 * NEWS: Document pipeline_start doc change
452 2020-01-01 Colin Watson <cjwatson@debian.org>
454 pipecmd_exec: Flush stdio in PIPECMD_FUNCTION case
456 This fixes a regression in eceb4fc9c1a800739f3876a5c9538376adc77876
457 where we could lose some output from functions that write to standard
458 output but don't explicitly flush.
460 * lib/pipeline.c (pipecmd_exec): Flush output streams before exiting in
461 the PIPECMD_FUNCTION case.
463 2020-01-01 Colin Watson <cjwatson@debian.org>
465 pipeline_start: Document that standard FDs must be open
467 Fixes Ubuntu bug #992271.
469 * lib/pipeline.h (pipeline_start): Document that FDs 0, 1, and 2 must be
470 open before calling this function.
471 * man/libpipeline.3 (pipeline_start): Likewise.
473 2019-12-27 Colin Watson <cjwatson@debian.org>
475 Use _exit rather than exit in pipecmd_exec
477 This avoids bugs such as functions registered using atexit being called
480 * lib/pipeline.c (pipecmd_exec): Call _exit rather than exit.
481 * NEWS: Document this.
483 2019-08-30 Colin Watson <cjwatson@debian.org>
485 Enable many more GCC warnings
487 * bootstrap.conf (gnulib_modules): Add manywarnings.<Paste>
488 * configure.ac: Add gl_MANYWARN_ALL_GCC, with some refinements to disable
489 -Wsystem-headers, -Wmissing-field-initializers, and -Winline.
491 2019-08-30 Colin Watson <cjwatson@debian.org>
493 Add several function attributes suggested by GCC
495 * lib/debug.c (vdebug): Mark first argument as a printf format string.
496 * lib/pipeline.c (pipecmd_get_nargs, pipeline_get_ncommands,
497 pipeline_get_command, pipeline_get_pid, pipeline_peek_size): Mark as
500 2019-08-30 Colin Watson <cjwatson@debian.org>
502 Make several functions static
504 * tests/argstr.c (argstr_suite): Make static.
505 * tests/basic.c (basic_suite): Likewise.
506 * tests/exec.c (exec_suite): Likewise.
507 * tests/inspect.c (inspect_suite): Likewise.
508 * tests/pump.c (pump_suite): Likewise.
509 * tests/read.c (read_suite): Likewise.
510 * tests/redirect.c (redirect_suite): Likewise.
512 2019-08-30 Colin Watson <cjwatson@debian.org>
514 Simplify some GCC attribute handling
516 We have to be a little careful, as we can't use Gnulib in the public
517 <pipeline.h> header; but we can rely on it for internal compilation
520 * lib/pipeline.c (passthrough): Use _GL_UNUSED rather than
521 PIPELINE_ATTR_UNUSED.
522 * tests/basic.c (pre_exec): Likewise.
523 * tests/common.h (MAIN): Likewise.
524 * tests/inspect.c (pid_helper): Likewise.
525 * tests/pump.c (tee_source): Likewise.
526 * lib/pipeline.h (PIPELINE_ATTR_UNUSED): Note that this is unused, but
527 preserved to avoid breaking (even undocumented) API.
529 2019-01-30 Colin Watson <cjwatson@debian.org>
533 * README, lib/libpipeline.pc.in (URL): Update homepage URL to
534 https://nongnu.org/libpipeline/.
536 2019-01-27 Colin Watson <cjwatson@debian.org>
540 * NEWS: Note Gnulib portability improvements.
542 2019-01-27 Colin Watson <cjwatson@debian.org>
544 Update to Gnulib 20190124
546 * bootstrap.conf (GNULIB_REVISION): Set to
547 34881aff4043847f2640d90cf9aa325cc3ad08d6.
549 2019-01-05 Colin Watson <cjwatson@debian.org>
551 Note requirement of Automake 1.11.2
553 AM_PROG_AR was actually introduced in 1.11.2, not 1.11.
555 * bootstrap.conf (buildreq): Bump required automake version to 1.11.2.
558 2019-01-05 Colin Watson <cjwatson@debian.org>
560 Upgrade to Gnulib 20190105
562 In line with Gnulib, we now require Autoconf 2.63 and Automake 1.11.
564 * bootstrap: Sync to Gnulib d271f868a8df9bbec29049d01e056481b7a1a263.
565 * bootstrap.conf (GNULIB_REVISION): Set to
566 d271f868a8df9bbec29049d01e056481b7a1a263.
567 (buildreq): Bump required autoconf version to 2.63.
568 * configure.ac (AM_INIT_AUTOMAKE): Bump to 1.11.
569 (AM_SILENT_RULES, AM_PROG_AR): Remove conditionals, which were there for
570 Automake 1.10 support.
571 (AC_PREREQ): Bump to 2.63.
572 * NEWS: Document this.
574 2019-01-05 Colin Watson <cjwatson@debian.org>
576 Use tar --sort=name if available
578 * m4/pipeline-tar-sort-name.m4: New file.
579 * configure.ac: Call PIPELINE_TAR_SORT_NAME.
581 2018-12-24 Colin Watson <cjwatson@debian.org>
583 More (void *) 0 as variadic sentinel
585 * tests/basic.c (test_basic_status, test_basic_args,
586 test_basic_pipeline, test_basic_wait_all, test_basic_setenv,
587 test_basic_unsetenv, test_basic_clearenv, test_basic_chdir,
588 test_basic_fchdir, test_basic_pre_exec, test_basic_sequence): Use
589 (void *) rather than NULL as a sentinel for variadic functions.
590 * tests/common.c (temp_dir_teardown): Likewise.
591 * tests/exec.c (test_exec_process): Likewise.
592 * tests/inspect.c (test_inspect_command, test_inspect_pipeline):
594 * tests/pump.c (fail_unless_files_equal,
595 test_pump_connect_attaches_correctly, test_pump_tee): Likewise.
596 * tests/redirect.c (test_redirect_files, test_redirect_outfile):
599 2018-12-24 Colin Watson <cjwatson@debian.org>
601 Use (void *) 0 as a variadic sentinel
603 NULL is formally incorrect here since the standard allows it to be an
604 integer constant expression.
606 * lib/pipeline.c (argstr_get_word, pipecmd_tostring, pipeline_tostring):
607 Use (void *) rather than NULL as a sentinel for variadic functions.
609 2018-05-29 Colin Watson <cjwatson@debian.org>
611 Avoid gl directory confusion
613 * bootstrap.conf (local_gl_dir): Set to 'gnulib-local'.
615 2018-05-28 Colin Watson <cjwatson@debian.org>
617 Prefer the Gnulib versions of some more files
619 * bootstrap.conf (gnulib_extra_files): Remove. (This has the effect of
620 reverting to bootstrap's default of also copying some files in
621 build-aux/ from Gnulib.)
623 2018-05-28 Colin Watson <cjwatson@debian.org>
625 Clean up bootstrap configuration slightly
627 * bootstrap.conf (gnulib_name, source_base, m4_base): Set these instead
628 of the corresponding options in gnulib_tool_option_extras.
630 2018-05-28 Colin Watson <cjwatson@debian.org>
632 Upgrade to Gnulib 20180527
634 * bootstrap.conf (GNULIB_URL): Remove.
635 (GNULIB_REVISION): Set to 90f289f249a266b1afb9c63e182f5d979d17df5f.
636 * configure.ac (AM_PROG_AR, LT_INIT): Move below gl_EARLY.
638 2018-05-27 Colin Watson <cjwatson@debian.org>
642 We no longer keep autogenerated files in git.
644 * .gitignore: Add **/Makefile.in, /INSTALL, /aclocal.m4, /build-aux,
645 /config.h.in, /configure, /gl, and /gnulib. Remove gnulib/*.
646 * INSTALL, Makefile.in, aclocal.m4, autogen.sh, build-aux, config.h.in,
647 configure, gnulib, lib/Makefile.in, man/Makefile.in, tests/Makefile.in:
649 * bootstrap, bootstrap.conf: New files.
650 * Makefile.am (SUBDIRS, EXTRA_DIST, ACLOCAL_AMFLAGS): Refer to gl/
651 rather than gnulib/ (gnulib/ now contains pristine source).
652 (EXTRA_DIST): Replace autogen.sh with bootstrap and bootstrap.conf.
653 Remove gnulib/m4/gnulib-cache.m4 and gnulib/m4/gnulib-tool.m4.
654 * configure.ac (AC_CONFIG_FILES): Refer to gl/ rather than gnulib/.
655 * lib/Makefile.am (libpipeline_la_CPPFLAGS, libpipeline_la_LIBADD):
657 * tests/Makefile.am (LIBS, AM_CPPFLAGS): Likewise.
658 * release.sh: Call ./bootstrap rather than ./autogen.sh.
660 2017-11-14 Colin Watson <cjwatson@debian.org>
664 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:0:5.
666 2017-11-14 Colin Watson <cjwatson@debian.org>
668 Add pipecmd_pre_exec function
670 * lib/pipeline-private.h (struct pipecmd): Add pre_exec_func,
671 pre_exec_free_func, and pre_exec_data.
672 * lib/pipeline.c (pipecmd_new, pipecmd_new_function,
673 pipecmd_new_sequencev): Initialise cmd->pre_exec_func,
674 cmd->pre_exec_free_func, and cmd->pre_exec_data.
675 (pipecmd_dup): Copy cmd->pre_exec_func, cmd->pre_exec_free_func, and
676 cmd->pre_exec_data if necessary.
677 (pipecmd_pre_exec): New function.
678 (pipecmd_exec): If cmd->pre_exec_func is set, call it immediately before
679 calling execvp or cmd->func.
680 * lib/pipeline.h (pipecmd_pre_exec): Add prototype.
681 (pipeline_install_post_fork): Cross-reference pipecmd_pre_exec in
683 * man/Makefile.am (FUNCTIONS): Add pipecmd_pre_exec.
684 * man/libpipeline.3 (Functions to build individual commands): Document
686 (Functions to run pipelines and handle signals): Cross-reference
687 pipecmd_pre_exec from pipeline_install_post_fork.
688 * tests/basic.c (test_basic_pre_exec): Test pipecmd_pre_exec.
689 * NEWS: Document this.
690 * README: Update copyright years.
692 2017-07-10 Colin Watson <cjwatson@debian.org>
694 tests/read.c: Update program_name
696 2017-07-10 Colin Watson <cjwatson@debian.org>
700 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 5:2:4.
702 2017-07-10 Colin Watson <cjwatson@debian.org>
704 Fix EOF detection in get_line
706 * lib/pipeline.c (get_line): A short read isn't a reliable way to detect
707 end-of-file. Instead, keep track of the previous buffer length returned
708 by get_block; if we get the same length twice in a row then that
710 * tests/reading_long_line.c: Rename to ...
711 * tests/read.c: ... this. Update build system and test names to match.
712 (slow_line_helper, test_read_readline_slow): New test.
714 2017-07-10 Colin Watson <cjwatson@debian.org>
716 Various autotools upgrades
718 Upgrade to Automake 1.15.1, config.guess 2016-10-02, config.sub
719 2016-11-04, and Libtool 2.4.6-2 (from Debian).
721 2016-10-13 Colin Watson <cjwatson@debian.org>
723 Add home page URL to README
725 Suggested by Christopher Yeleighton.
727 2015-08-17 Colin Watson <cjwatson@debian.org>
731 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
734 2015-08-17 Colin Watson <cjwatson@debian.org>
736 Upgrade to Automake 1:1.15-3 (from Debian).
738 2015-08-16 Colin Watson <cjwatson@debian.org>
740 Fix test failure with Check 0.10.0
742 Reported by Bruce Dubbs.
744 * tests/inspect.c (pid_helper): Set SIGTERM back to SIG_DFL, in case
745 Check installed its own handler for that.
746 * NEWS: Document this.
748 2015-08-06 Colin Watson <cjwatson@debian.org>
750 Upgrade to Automake 1.15.
752 2015-06-18 Colin Watson <cjwatson@debian.org>
754 Various autotools upgrades
756 * aclocal.m4: Upgrade to Gettext 0.19.4.
757 * build-aux/ltmain.sh: Upgrade to Libtool 2.4.2-1.11 (from Debian).
759 2014-10-26 Colin Watson <cjwatson@debian.org>
763 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
766 2014-10-26 Colin Watson <cjwatson@debian.org>
768 Remove generated gnulib/lib/fcntl.h, added by accident
770 * gnulib/lib/fcntl.h: Remove.
771 * .gitignore: Add gnulib/lib/fcntl.h.
773 2014-10-24 Colin Watson <cjwatson@debian.org>
775 Add pipecmd_fchdir function
777 * lib/pipeline-private.h (struct pipecmd): Add cwd_fd.
778 * lib/pipeline.c (pipecmd_new, pipecmd_new_function,
779 pipecmd_new_sequencev): Initialise cmd->cwd_fd.
780 (pipecmd_dup): Copy cmd->cwd_fd if necessary.
781 (pipecmd_fchdir): New function.
782 (pipecmd_dump, pipecmd_tostring): Serialise cmd->cwd_fd as "(cd <fd
783 %d> && ...)" if necessary.
784 (pipecmd_exec): If cmd->cwd_fd is set, fchdir to it.
785 * lib/pipeline.h (pipecmd_fchdir): Add prototype.
786 * man/Makefile.am (FUNCTIONS): Add pipecmd_fchdir.
787 * man/libpipeline.3 (Functions to build individual commands):
788 Document pipecmd_fchdir.
789 * tests/basic.c (test_basic_fchdir): Test pipecmd_fchdir.
790 * NEWS: Document this.
792 2014-10-22 Colin Watson <cjwatson@debian.org>
794 NEWS: Document recent Solaris portability changes
796 2014-10-22 Colin Watson <cjwatson@debian.org>
798 Add a cleaner way to suppress "Terminated" errors in tests
800 * lib/pipeline.c (pipecmd_exec, pipeline_wait_all): If
801 PIPELINE_QUIET is set, don't emit an error message when a subprocess
802 is terminated by a signal.
803 * man/libpipeline.3 (ENVIRONMENT): Document this.
804 * tests/inspect.c (test_inspect_pid): Use this rather than assigning
805 to stderr, which is not portable to Solaris. Reported by Peter
808 2014-10-22 Colin Watson <cjwatson@debian.org>
810 autogen.sh: Avoid "export VARIABLE=value" syntax
812 Older Solaris shells do not support this. Patch by Peter Bray.
814 2014-10-22 Colin Watson <cjwatson@debian.org>
816 gnulib: Import mkdtemp module.
818 Suggested by Peter Bray.
820 2014-09-22 Colin Watson <cjwatson@debian.org>
824 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
827 2014-09-22 Colin Watson <cjwatson@debian.org>
829 Fix build on systems with neither setenv nor clearenv
831 Fixes Savannah bug #43265.
833 * lib/pipeline.c (clearenv): Don't define if defined(HAVE_SETENV),
834 as in that case gnulib will provide this symbol.
835 * lib/pipeline-private.h (clearenv): Likewise.
836 * NEWS: Document this.
838 2014-09-17 Colin Watson <cjwatson@debian.org>
840 Make sure that the generated shared library has no undefined symbols
842 Based on a change found in
843 https://github.com/Alexpux/MSYS2-packages/tree/master/libpipeline.
845 * lib/Makefile.am (libpipeline_la_LDFLAGS): Add -no-undefined.
847 2014-09-15 Colin Watson <cjwatson@debian.org>
849 Various autotools upgrades
851 * aclocal.m4: Upgrade to pkg-config 0.28 and Gettext 0.19.2.
852 * build-aux/config.sub: Upgrade to 2014-09-11.
853 * build-aux/ltmain.sh: Upgrade to Libtool 2.4.2-1.10 (from Debian).
855 2014-08-03 Colin Watson <cjwatson@debian.org>
857 Update to config.guess 2014-03-23 and config.sub 2014-05-01.
859 2014-04-23 Colin Watson <cjwatson@debian.org>
861 Fix test failures on Cygwin.
863 Reported by Chris J. Breisch.
865 * configure.ac: Define SHELL as a C preprocessor symbol.
866 * tests/basic.c (test_basic_wait_all, test_basic_setenv,
867 test_basic_unsetenv, test_basic_clearenv): Execute SHELL rather than
869 * tests/exec.c (test_exec_process): Likewise.
871 * tests/basic.c (test_basic_args, test_basic_pipeline,
872 test_basic_unsetenv, test_basic_clearenv, test_basic_chdir,
873 test_basic_sequence): Check for pipeline_readline returning NULL.
874 * tests/inspect.c (test_inspect_pid): Likewise.
875 * tests/redirect.c (test_redirect_files): Likewise.
877 * NEWS: Document this.
879 2014-03-26 Colin Watson <cjwatson@debian.org>
883 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
886 2014-03-26 Colin Watson <cjwatson@debian.org>
888 * NEWS: Set next version to 1.3.0, due to new API.
890 * lib/pipeline.c (pipecmd_dump): Simplify one fprintf to fputs.
892 Upgrade to Automake 1:1.14.1-3 (from Debian).
894 2014-03-26 Colin Watson <cjwatson@debian.org>
896 Add pipecmd_chdir function
898 * lib/pipeline-private.h (struct pipecmd): Add cwd.
899 * lib/pipeline.c (pipecmd_new, pipecmd_new_function,
900 pipecmd_new_sequencev): Initialise cmd->cwd.
901 (pipecmd_dup): Copy cmd->cwd if necessary.
902 (pipecmd_chdir): New function.
903 (pipecmd_dump, pipecmd_tostring): Serialise cmd->cwd as "(cd %s &&
905 (pipecmd_exec): If cmd->cwd is set, chdir to it.
906 (pipecmd_free): Free cmd->cwd.
907 * lib/pipeline.h (pipecmd_chdir): Add prototype.
908 * man/Makefile.am (FUNCTIONS): Add pipecmd_chdir.
909 * man/libpipeline.3 (Functions to build individual commands):
910 Document pipecmd_chdir.
911 * tests/basic.c (test_basic_chdir): Test pipecmd_chdir.
912 * NEWS: Document this.
914 2014-02-20 Colin Watson <cjwatson@debian.org>
916 Move Autotools auxiliary build files from tools to build-aux.
918 "build-aux" is a more conventional location for the Autotools files.
920 2014-02-18 Colin Watson <cjwatson@debian.org>
922 Upgrade to Gnulib 20140202 and Libtool 2.4.2-1.7 (from Debian).
924 2014-02-06 Colin Watson <cjwatson@debian.org>
926 Upgrade to Automake 1.14.1 and Libtool 2.4.2-1.6 (from Debian).
928 2013-12-18 Colin Watson <cjwatson@debian.org>
932 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
935 2013-12-18 Colin Watson <cjwatson@debian.org>
937 Fix occasional failure in test_pump_tee
939 * tests/pump.c (test_pump_tee): Wait for child processes before
941 * NEWS: Document this.
943 2013-12-18 Colin Watson <cjwatson@debian.org>
945 Clarify pipeline_wait's return value
947 * man/libpipeline.3 (pipeline_wait): Synchronise description of
948 return value with pipeline.h.
950 2013-12-03 Colin Watson <cjwatson@debian.org>
954 * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
957 2013-12-03 Colin Watson <cjwatson@debian.org>
959 gnulib: Import gnupload module.
961 2013-12-03 Colin Watson <cjwatson@debian.org>
963 Build with large file support where available
965 * gnulib: Import largefile module.
966 * NEWS: Document this.
968 2013-12-03 Colin Watson <cjwatson@debian.org>
970 Automatically generate ChangeLog from git
972 * ChangeLog: Move to ...
973 * ChangeLog-2013: ... here.
974 * Makefile.am (EXTRA_DIST): Add ChangeLog-2013.
975 (dist-hook): Add gen-ChangeLog.
976 (gen-ChangeLog): New rule, based on that in coreutils.
977 * gnulib: Import gitlog-to-changelog module.