1. 25 Nov, 2020 5 commits
    • Colin Watson's avatar
      Upgrade to Gnulib 20201125 · ba8da2dc
      Colin Watson authored
      In line with Gnulib, we now require Autoconf 2.64.
      
      * bootstrap: Sync to Gnulib f2a67f071d170920314c9a3b8de3e85259b4e010.
      * bootstrap.conf (GNULIB_REVISION): Set to
      f2a67f071d170920314c9a3b8de3e85259b4e010.
      (buildreq): Bump required autoconf version to 2.64.
      * configure.ac (AC_PREREQ): Bump to 2.64.
      * NEWS: Document this.
      ba8da2dc
    • Colin Watson's avatar
      NEWS: Document move to GitLab · 94a7e125
      Colin Watson authored
      94a7e125
    • Colin Watson's avatar
      Flesh out README · 4b1808eb
      Colin Watson authored
      * README: Move to ...
      * README.md: ... here.  Reformat as Markdown.
      (Using the library): New section, mainly borrowed from the project
      homepage.
      4b1808eb
    • Colin Watson's avatar
      Document migration to GitLab · 06f54396
      Colin Watson authored
      * README: Add link to GitLab repository.
      (Bug reporting): New section.
      06f54396
    • Colin Watson's avatar
      Add .gitlab-ci.yml · 9c4fde4a
      Colin Watson authored
      9c4fde4a
  2. 13 Aug, 2020 1 commit
    • Colin Watson's avatar
      Version: 1.5.3 · 5498dd55
      Colin Watson authored
      * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:3:5.
      5498dd55
  3. 03 Aug, 2020 1 commit
    • Colin Watson's avatar
      Port tests to the modern Check API · 1be57f95
      Colin Watson authored
      Fixes Savannah bug #58883.
      
      * configure.ac: Test for check >= 0.9.10.
      * tests/argstr.c, tests/basic.c, tests/exec.c, tests/inspect.c,
      tests/pump.c, tests/read.c, tests/redirect.c: Replace uses of
      fail_unless and fail_if with appropriate ck_assert_* calls.  In most
      cases these now use more specific equality etc. tests rather than just
      passing arbitrary predicates.
      * README: Document updated dependency.
      * NEWS: Document this.
      1be57f95
  4. 04 Jul, 2020 1 commit
    • Colin Watson's avatar
      Fix handling of read/write errors · d668df8d
      Colin Watson authored
      safe_read and safe_write return size_t and define SAFE_READ_ERROR and
      SAFE_WRITE_ERROR as error return values.  We had previously been
      assigning their result to a signed value.  As a result, whether
      passthrough, pipeline_pump, and get_block would detect read/write errors
      was implementation-defined.
      
      * lib/pipeline.c (passthrough, get_block): Assign safe_read return value
      to a size_t rather than a signed integer type, and check for
      SAFE_READ_ERROR rather than negative values.
      (pipeline_pump): Assign safe_write return value to a size_t rather than
      an ssize_t, and check for SAFE_WRITE_ERROR rather than negative values.
      * NEWS: Document this.
      d668df8d
  5. 01 Jan, 2020 4 commits
  6. 27 Dec, 2019 1 commit
    • Colin Watson's avatar
      Use _exit rather than exit in pipecmd_exec · eceb4fc9
      Colin Watson authored
      This avoids bugs such as functions registered using atexit being called
      multiple times.
      
      * lib/pipeline.c (pipecmd_exec): Call _exit rather than exit.
      * NEWS: Document this.
      eceb4fc9
  7. 30 Aug, 2019 4 commits
    • Colin Watson's avatar
      Enable many more GCC warnings · cc764093
      Colin Watson authored
      * bootstrap.conf (gnulib_modules): Add manywarnings.<Paste>
      * configure.ac: Add gl_MANYWARN_ALL_GCC, with some refinements to disable
      -Wsystem-headers, -Wmissing-field-initializers, and -Winline.
      cc764093
    • Colin Watson's avatar
      Add several function attributes suggested by GCC · f5de0d3b
      Colin Watson authored
      * lib/debug.c (vdebug): Mark first argument as a printf format string.
      * lib/pipeline.c (pipecmd_get_nargs, pipeline_get_ncommands,
      pipeline_get_command, pipeline_get_pid, pipeline_peek_size): Mark as
      pure.
      f5de0d3b
    • Colin Watson's avatar
      Make several functions static · 760cec6f
      Colin Watson authored
      * tests/argstr.c (argstr_suite): Make static.
      * tests/basic.c (basic_suite): Likewise.
      * tests/exec.c (exec_suite): Likewise.
      * tests/inspect.c (inspect_suite): Likewise.
      * tests/pump.c (pump_suite): Likewise.
      * tests/read.c (read_suite): Likewise.
      * tests/redirect.c (redirect_suite): Likewise.
      760cec6f
    • Colin Watson's avatar
      Simplify some GCC attribute handling · 3e16e86b
      Colin Watson authored
      We have to be a little careful, as we can't use Gnulib in the public
      <pipeline.h> header; but we can rely on it for internal compilation
      units.
      
      * lib/pipeline.c (passthrough): Use _GL_UNUSED rather than
      PIPELINE_ATTR_UNUSED.
      * tests/basic.c (pre_exec): Likewise.
      * tests/common.h (MAIN): Likewise.
      * tests/inspect.c (pid_helper): Likewise.
      * tests/pump.c (tee_source): Likewise.
      * lib/pipeline.h (PIPELINE_ATTR_UNUSED): Note that this is unused, but
      preserved to avoid breaking (even undocumented) API.
      3e16e86b
  8. 30 Jan, 2019 1 commit
  9. 27 Jan, 2019 3 commits
  10. 05 Jan, 2019 3 commits
    • Colin Watson's avatar
      Note requirement of Automake 1.11.2 · 32d61235
      Colin Watson authored
      AM_PROG_AR was actually introduced in 1.11.2, not 1.11.
      
      * bootstrap.conf (buildreq): Bump required automake version to 1.11.2.
      * NEWS: Clarify.
      32d61235
    • Colin Watson's avatar
      Upgrade to Gnulib 20190105 · 384358ad
      Colin Watson authored
      In line with Gnulib, we now require Autoconf 2.63 and Automake 1.11.
      
      * bootstrap: Sync to Gnulib d271f868a8df9bbec29049d01e056481b7a1a263.
      * bootstrap.conf (GNULIB_REVISION): Set to
      d271f868a8df9bbec29049d01e056481b7a1a263.
      (buildreq): Bump required autoconf version to 2.63.
      * configure.ac (AM_INIT_AUTOMAKE): Bump to 1.11.
      (AM_SILENT_RULES, AM_PROG_AR): Remove conditionals, which were there for
      Automake 1.10 support.
      (AC_PREREQ): Bump to 2.63.
      * NEWS: Document this.
      384358ad
    • Colin Watson's avatar
      Use tar --sort=name if available · 1c2faf2c
      Colin Watson authored
      * m4/pipeline-tar-sort-name.m4: New file.
      * configure.ac: Call PIPELINE_TAR_SORT_NAME.
      1c2faf2c
  11. 24 Dec, 2018 2 commits
    • Colin Watson's avatar
      More (void *) 0 as variadic sentinel · 1569f8f1
      Colin Watson authored
      * tests/basic.c (test_basic_status, test_basic_args,
      test_basic_pipeline, test_basic_wait_all, test_basic_setenv,
      test_basic_unsetenv, test_basic_clearenv, test_basic_chdir,
      test_basic_fchdir, test_basic_pre_exec, test_basic_sequence): Use
      (void *) rather than NULL as a sentinel for variadic functions.
      * tests/common.c (temp_dir_teardown): Likewise.
      * tests/exec.c (test_exec_process): Likewise.
      * tests/inspect.c (test_inspect_command, test_inspect_pipeline):
      Likewise.
      * tests/pump.c (fail_unless_files_equal,
      test_pump_connect_attaches_correctly, test_pump_tee): Likewise.
      * tests/redirect.c (test_redirect_files, test_redirect_outfile):
      Likewise.
      1569f8f1
    • Colin Watson's avatar
      Use (void *) 0 as a variadic sentinel · e6ff06b8
      Colin Watson authored
      NULL is formally incorrect here since the standard allows it to be an
      integer constant expression.
      
      * lib/pipeline.c (argstr_get_word, pipecmd_tostring, pipeline_tostring):
      Use (void *) rather than NULL as a sentinel for variadic functions.
      e6ff06b8
  12. 29 May, 2018 1 commit
  13. 28 May, 2018 3 commits
    • Colin Watson's avatar
      Prefer the Gnulib versions of some more files · 59b4307c
      Colin Watson authored
      * bootstrap.conf (gnulib_extra_files): Remove.  (This has the effect of
      reverting to bootstrap's default of also copying some files in
      build-aux/ from Gnulib.)
      59b4307c
    • Colin Watson's avatar
      Clean up bootstrap configuration slightly · 9253fb77
      Colin Watson authored
      * bootstrap.conf (gnulib_name, source_base, m4_base): Set these instead
      of the corresponding options in gnulib_tool_option_extras.
      9253fb77
    • Colin Watson's avatar
      Upgrade to Gnulib 20180527 · 98002165
      Colin Watson authored
      * bootstrap.conf (GNULIB_URL): Remove.
      (GNULIB_REVISION): Set to 90f289f249a266b1afb9c63e182f5d979d17df5f.
      * configure.ac (AM_PROG_AR, LT_INIT): Move below gl_EARLY.
      98002165
  14. 27 May, 2018 1 commit
    • Colin Watson's avatar
      Switch to bootstrap · 9b7b0d22
      Colin Watson authored
      We no longer keep autogenerated files in git.
      
      * .gitignore: Add **/Makefile.in, /INSTALL, /aclocal.m4, /build-aux,
      /config.h.in, /configure, /gl, and /gnulib.  Remove gnulib/*.
      * INSTALL, Makefile.in, aclocal.m4, autogen.sh, build-aux, config.h.in,
      configure, gnulib, lib/Makefile.in, man/Makefile.in, tests/Makefile.in:
      Remove.
      * bootstrap, bootstrap.conf: New files.
      * Makefile.am (SUBDIRS, EXTRA_DIST, ACLOCAL_AMFLAGS): Refer to gl/
      rather than gnulib/ (gnulib/ now contains pristine source).
      (EXTRA_DIST): Replace autogen.sh with bootstrap and bootstrap.conf.
      Remove gnulib/m4/gnulib-cache.m4 and gnulib/m4/gnulib-tool.m4.
      * configure.ac (AC_CONFIG_FILES): Refer to gl/ rather than gnulib/.
      * lib/Makefile.am (libpipeline_la_CPPFLAGS, libpipeline_la_LIBADD):
      Likewise.
      * tests/Makefile.am (LIBS, AM_CPPFLAGS): Likewise.
      * release.sh: Call ./bootstrap rather than ./autogen.sh.
      9b7b0d22
  15. 14 Nov, 2017 2 commits
    • Colin Watson's avatar
      Version: 1.5.0. · 5b448639
      Colin Watson authored
      * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:0:5.
      5b448639
    • Colin Watson's avatar
      Add pipecmd_pre_exec function · be7edd06
      Colin Watson authored
      * lib/pipeline-private.h (struct pipecmd): Add pre_exec_func,
      pre_exec_free_func, and pre_exec_data.
      * lib/pipeline.c (pipecmd_new, pipecmd_new_function,
      pipecmd_new_sequencev): Initialise cmd->pre_exec_func,
      cmd->pre_exec_free_func, and cmd->pre_exec_data.
      (pipecmd_dup): Copy cmd->pre_exec_func, cmd->pre_exec_free_func, and
      cmd->pre_exec_data if necessary.
      (pipecmd_pre_exec): New function.
      (pipecmd_exec): If cmd->pre_exec_func is set, call it immediately before
      calling execvp or cmd->func.
      * lib/pipeline.h (pipecmd_pre_exec): Add prototype.
      (pipeline_install_post_fork): Cross-reference pipecmd_pre_exec in
      comment.
      * man/Makefile.am (FUNCTIONS): Add pipecmd_pre_exec.
      * man/libpipeline.3 (Functions to build individual commands): Document
      pipecmd_pre_exec.
      (Functions to run pipelines and handle signals): Cross-reference
      pipecmd_pre_exec from pipeline_install_post_fork.
      * tests/basic.c (test_basic_pre_exec): Test pipecmd_pre_exec.
      * NEWS: Document this.
      * README: Update copyright years.
      be7edd06
  16. 10 Jul, 2017 4 commits
    • Colin Watson's avatar
      tests/read.c: Update program_name · 34fd4ab4
      Colin Watson authored
      34fd4ab4
    • Colin Watson's avatar
      Version: 1.4.2. · 730709d0
      Colin Watson authored
      * lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 5:2:4.
      730709d0
    • Colin Watson's avatar
      Fix EOF detection in get_line · 65fd8474
      Colin Watson authored
      * lib/pipeline.c (get_line): A short read isn't a reliable way to detect
      end-of-file.  Instead, keep track of the previous buffer length returned
      by get_block; if we get the same length twice in a row then that
      indicates EOF.
      * tests/reading_long_line.c: Rename to ...
      * tests/read.c: ... this.  Update build system and test names to match.
      (slow_line_helper, test_read_readline_slow): New test.
      65fd8474
    • Colin Watson's avatar
      Various autotools upgrades · 2dd24921
      Colin Watson authored
      Upgrade to Automake 1.15.1, config.guess 2016-10-02, config.sub
      2016-11-04, and Libtool 2.4.6-2 (from Debian).
      2dd24921
  17. 13 Oct, 2016 1 commit
  18. 17 Aug, 2015 2 commits