libpipeline-1.5.2/ 0000775 0001750 0001750 00000000000 13603143113 011011 5 0000000 0000000 libpipeline-1.5.2/.gitignore 0000664 0001750 0001750 00000000575 13311161126 012730 0000000 0000000 **/*.a
**/*.la
**/*.lo
**/*.o
**/*.so
**/*~
**/.deps
**/.libs
**/Makefile
**/Makefile.in
/INSTALL
/aclocal.m4
/autom4te.cache
/build-aux
/config.h
/config.h.in
/config.log
/config.status
/config.status.lineno
/configure
/gl
/gnulib
/libtool
/stamp-h*
lib/libpipeline.pc
tests/*.log
tests/*.trs
tests/argstr
tests/basic
tests/exec
tests/inspect
tests/pump
tests/read
tests/redirect
libpipeline-1.5.2/COPYING 0000644 0001750 0001750 00000104513 12246415424 011777 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
libpipeline-1.5.2/ChangeLog 0000664 0001750 0001750 00000040362 13603143113 012510 0000000 0000000 2020-01-01 Colin Watson
Version: 1.5.2
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:2:5.
* README: Update copyright dates.
2020-01-01 Colin Watson
* NEWS: Document pipeline_start doc change
2020-01-01 Colin Watson
pipecmd_exec: Flush stdio in PIPECMD_FUNCTION case
This fixes a regression in eceb4fc9c1a800739f3876a5c9538376adc77876
where we could lose some output from functions that write to standard
output but don't explicitly flush.
* lib/pipeline.c (pipecmd_exec): Flush output streams before exiting in
the PIPECMD_FUNCTION case.
2020-01-01 Colin Watson
pipeline_start: Document that standard FDs must be open
Fixes Ubuntu bug #992271.
* lib/pipeline.h (pipeline_start): Document that FDs 0, 1, and 2 must be
open before calling this function.
* man/libpipeline.3 (pipeline_start): Likewise.
2019-12-27 Colin Watson
Use _exit rather than exit in pipecmd_exec
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.
2019-08-31 Colin Watson
Enable many more GCC warnings
* bootstrap.conf (gnulib_modules): Add manywarnings.
* configure.ac: Add gl_MANYWARN_ALL_GCC, with some refinements to disable
-Wsystem-headers, -Wmissing-field-initializers, and -Winline.
2019-08-31 Colin Watson
Add several function attributes suggested by GCC
* 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.
2019-08-31 Colin Watson
Make several functions static
* 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.
2019-08-31 Colin Watson
Simplify some GCC attribute handling
We have to be a little careful, as we can't use Gnulib in the public
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.
2019-01-30 Colin Watson
Use HTTPS URL
* README, lib/libpipeline.pc.in (URL): Update homepage URL to
https://nongnu.org/libpipeline/.
2019-01-27 Colin Watson
Version: 1.5.1
* NEWS: Note Gnulib portability improvements.
2019-01-27 Colin Watson
Update to Gnulib 20190124
* bootstrap.conf (GNULIB_REVISION): Set to
34881aff4043847f2640d90cf9aa325cc3ad08d6.
2019-01-05 Colin Watson
Note requirement of Automake 1.11.2
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.
2019-01-05 Colin Watson
Upgrade to Gnulib 20190105
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.
2019-01-05 Colin Watson
Use tar --sort=name if available
* m4/pipeline-tar-sort-name.m4: New file.
* configure.ac: Call PIPELINE_TAR_SORT_NAME.
2018-12-24 Colin Watson
More (void *) 0 as variadic sentinel
* 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.
2018-12-24 Colin Watson
Use (void *) 0 as a variadic sentinel
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.
2018-05-29 Colin Watson
Avoid gl directory confusion
* bootstrap.conf (local_gl_dir): Set to 'gnulib-local'.
2018-05-28 Colin Watson
Prefer the Gnulib versions of some more files
* 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.)
2018-05-28 Colin Watson
Clean up bootstrap configuration slightly
* bootstrap.conf (gnulib_name, source_base, m4_base): Set these instead
of the corresponding options in gnulib_tool_option_extras.
2018-05-28 Colin Watson
Upgrade to Gnulib 20180527
* bootstrap.conf (GNULIB_URL): Remove.
(GNULIB_REVISION): Set to 90f289f249a266b1afb9c63e182f5d979d17df5f.
* configure.ac (AM_PROG_AR, LT_INIT): Move below gl_EARLY.
2018-05-28 Colin Watson
Switch to bootstrap
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.
2017-11-14 Colin Watson
Version: 1.5.0.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 6:0:5.
2017-11-14 Colin Watson
Add pipecmd_pre_exec function
* 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.
2017-07-10 Colin Watson
tests/read.c: Update program_name
2017-07-10 Colin Watson
Version: 1.4.2.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to 5:2:4.
2017-07-10 Colin Watson
Fix EOF detection in get_line
* 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.
2017-07-10 Colin Watson
Various autotools upgrades
Upgrade to Automake 1.15.1, config.guess 2016-10-02, config.sub
2016-11-04, and Libtool 2.4.6-2 (from Debian).
2016-10-13 Colin Watson
Add home page URL to README
Suggested by Christopher Yeleighton.
2015-08-17 Colin Watson
Version: 1.4.1.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
5:1:4.
2015-08-17 Colin Watson
Upgrade to Automake 1:1.15-3 (from Debian).
2015-08-16 Colin Watson
Fix test failure with Check 0.10.0
Reported by Bruce Dubbs.
* tests/inspect.c (pid_helper): Set SIGTERM back to SIG_DFL, in case
Check installed its own handler for that.
* NEWS: Document this.
2015-08-06 Colin Watson
Upgrade to Automake 1.15.
2015-06-18 Colin Watson
Various autotools upgrades
* aclocal.m4: Upgrade to Gettext 0.19.4.
* build-aux/ltmain.sh: Upgrade to Libtool 2.4.2-1.11 (from Debian).
2014-10-26 Colin Watson
Version: 1.4.0.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
5:0:4.
2014-10-26 Colin Watson
Remove generated gnulib/lib/fcntl.h, added by accident
* gnulib/lib/fcntl.h: Remove.
* .gitignore: Add gnulib/lib/fcntl.h.
2014-10-24 Colin Watson
Add pipecmd_fchdir function
* lib/pipeline-private.h (struct pipecmd): Add cwd_fd.
* lib/pipeline.c (pipecmd_new, pipecmd_new_function,
pipecmd_new_sequencev): Initialise cmd->cwd_fd.
(pipecmd_dup): Copy cmd->cwd_fd if necessary.
(pipecmd_fchdir): New function.
(pipecmd_dump, pipecmd_tostring): Serialise cmd->cwd_fd as "(cd && ...)" if necessary.
(pipecmd_exec): If cmd->cwd_fd is set, fchdir to it.
* lib/pipeline.h (pipecmd_fchdir): Add prototype.
* man/Makefile.am (FUNCTIONS): Add pipecmd_fchdir.
* man/libpipeline.3 (Functions to build individual commands):
Document pipecmd_fchdir.
* tests/basic.c (test_basic_fchdir): Test pipecmd_fchdir.
* NEWS: Document this.
2014-10-23 Colin Watson
NEWS: Document recent Solaris portability changes
2014-10-23 Colin Watson
Add a cleaner way to suppress "Terminated" errors in tests
* lib/pipeline.c (pipecmd_exec, pipeline_wait_all): If
PIPELINE_QUIET is set, don't emit an error message when a subprocess
is terminated by a signal.
* man/libpipeline.3 (ENVIRONMENT): Document this.
* tests/inspect.c (test_inspect_pid): Use this rather than assigning
to stderr, which is not portable to Solaris. Reported by Peter
Bray.
2014-10-22 Colin Watson
autogen.sh: Avoid "export VARIABLE=value" syntax
Older Solaris shells do not support this. Patch by Peter Bray.
2014-10-22 Colin Watson
gnulib: Import mkdtemp module.
Suggested by Peter Bray.
2014-09-22 Colin Watson
Version: 1.3.1.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
4:1:3.
2014-09-22 Colin Watson
Fix build on systems with neither setenv nor clearenv
Fixes Savannah bug #43265.
* lib/pipeline.c (clearenv): Don't define if defined(HAVE_SETENV),
as in that case gnulib will provide this symbol.
* lib/pipeline-private.h (clearenv): Likewise.
* NEWS: Document this.
2014-09-17 Colin Watson
Make sure that the generated shared library has no undefined symbols
Based on a change found in
https://github.com/Alexpux/MSYS2-packages/tree/master/libpipeline.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Add -no-undefined.
2014-09-15 Colin Watson
Various autotools upgrades
* aclocal.m4: Upgrade to pkg-config 0.28 and Gettext 0.19.2.
* build-aux/config.sub: Upgrade to 2014-09-11.
* build-aux/ltmain.sh: Upgrade to Libtool 2.4.2-1.10 (from Debian).
2014-08-03 Colin Watson
Update to config.guess 2014-03-23 and config.sub 2014-05-01.
2014-04-24 Colin Watson
Fix test failures on Cygwin.
Reported by Chris J. Breisch.
* configure.ac: Define SHELL as a C preprocessor symbol.
* tests/basic.c (test_basic_wait_all, test_basic_setenv,
test_basic_unsetenv, test_basic_clearenv): Execute SHELL rather than
"sh".
* tests/exec.c (test_exec_process): Likewise.
* tests/basic.c (test_basic_args, test_basic_pipeline,
test_basic_unsetenv, test_basic_clearenv, test_basic_chdir,
test_basic_sequence): Check for pipeline_readline returning NULL.
* tests/inspect.c (test_inspect_pid): Likewise.
* tests/redirect.c (test_redirect_files): Likewise.
* NEWS: Document this.
2014-03-26 Colin Watson
Version: 1.3.0.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
4:0:3.
2014-03-26 Colin Watson
* NEWS: Set next version to 1.3.0, due to new API.
* lib/pipeline.c (pipecmd_dump): Simplify one fprintf to fputs.
Upgrade to Automake 1:1.14.1-3 (from Debian).
2014-03-26 Colin Watson
Add pipecmd_chdir function
* lib/pipeline-private.h (struct pipecmd): Add cwd.
* lib/pipeline.c (pipecmd_new, pipecmd_new_function,
pipecmd_new_sequencev): Initialise cmd->cwd.
(pipecmd_dup): Copy cmd->cwd if necessary.
(pipecmd_chdir): New function.
(pipecmd_dump, pipecmd_tostring): Serialise cmd->cwd as "(cd %s &&
...)" if necessary.
(pipecmd_exec): If cmd->cwd is set, chdir to it.
(pipecmd_free): Free cmd->cwd.
* lib/pipeline.h (pipecmd_chdir): Add prototype.
* man/Makefile.am (FUNCTIONS): Add pipecmd_chdir.
* man/libpipeline.3 (Functions to build individual commands):
Document pipecmd_chdir.
* tests/basic.c (test_basic_chdir): Test pipecmd_chdir.
* NEWS: Document this.
2014-02-20 Colin Watson
Move Autotools auxiliary build files from tools to build-aux.
"build-aux" is a more conventional location for the Autotools files.
2014-02-18 Colin Watson
Upgrade to Gnulib 20140202 and Libtool 2.4.2-1.7 (from Debian).
2014-02-06 Colin Watson
Upgrade to Automake 1.14.1 and Libtool 2.4.2-1.6 (from Debian).
2013-12-18 Colin Watson
Version: 1.2.6.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
3:6:2.
2013-12-18 Colin Watson
Fix occasional failure in test_pump_tee
* tests/pump.c (test_pump_tee): Wait for child processes before
testing output.
* NEWS: Document this.
2013-12-18 Colin Watson
Clarify pipeline_wait's return value
* man/libpipeline.3 (pipeline_wait): Synchronise description of
return value with pipeline.h.
2013-12-03 Colin Watson
Version: 1.2.5.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
3:5:2.
2013-12-03 Colin Watson
gnulib: Import gnupload module.
2013-12-03 Colin Watson
Build with large file support where available
* gnulib: Import largefile module.
* NEWS: Document this.
2013-12-03 Colin Watson
Automatically generate ChangeLog from git
* ChangeLog: Move to ...
* ChangeLog-2013: ... here.
* Makefile.am (EXTRA_DIST): Add ChangeLog-2013.
(dist-hook): Add gen-ChangeLog.
(gen-ChangeLog): New rule, based on that in coreutils.
* gnulib: Import gitlog-to-changelog module.
libpipeline-1.5.2/ChangeLog-2013 0000644 0001750 0001750 00000144141 12246451573 013107 0000000 0000000 Sat Nov 30 21:07:06 GMT 2013 Colin Watson
* .bzrignore: Move to ...
* .gitignore: ... here, adjusting for differences between bzr and
git.
* Makefile.am (EXTRA_DIST): Replace .bzrignore with .gitignore.
* gnulib: Add --no-vc-files.
Wed Nov 27 10:50:43 GMT 2013 Colin Watson
* configure.ac: Only call AC_PROG_AR if it is defined, to restore
compatibility with Automake 1.10 (thanks, Mathieu Malaterre;
Debian bug #730191).
* NEWS: Document this.
Wed Nov 27 10:48:16 GMT 2013 Colin Watson
Upgrade to Automake 1.14, Gettext 0.18.3, and Gnulib 20130805.
Sun Jun 23 12:44:09 BST 2013 Colin Watson
* lib/pipeline-private.h (struct pipeline): Make want_infile and
want_outfile non-const.
* lib/pipeline.c (pipeline_join): Take copies of p1->want_infile and
p2->want_outfile.
(pipeline_want_infile): Take a copy of file.
(pipeline_want_outfile): Likewise.
(pipeline_free): Free p->want_infile and p->want_outfile.
* NEWS: Document this.
Sun Jun 23 12:40:32 BST 2013 Colin Watson
* lib/pipeline.c (argstr_get_word, pipeline_free): Remove
unnecessary tests before freeing pointers.
Sat Jun 22 17:12:03 BST 2013 Colin Watson
* tests/common.c (temp_dir_setup): Fail the test if mkdtemp fails.
Thu Jun 6 12:43:06 BST 2013 Colin Watson
* Version: 1.2.4.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
3:4:2.
Thu Jun 6 12:38:07 BST 2013 Colin Watson
* NEWS: Document changes since 1.2.3.
Wed Jun 5 20:28:59 BST 2013 Colin Watson
Provide a replacement clearenv for non-glibc systems that lack it
(Savannah bug #36848).
* gnulib: Import environ module.
* configure.ac: Check for clearenv.
* lib/pipeline.c [!HAVE_CLEARENV] (clearenv): New replacement
function.
* lib/pipeline-private.h [!HAVE_CLEARENV] (clearenv): Add prototype.
Wed Jun 5 20:18:23 BST 2013 Colin Watson
* aclocal.m4: Upgrade to Gettext 0.18.2.1.
Wed Jun 5 20:12:11 BST 2013 Colin Watson
* tools/config.guess: Update to 2013-05-16.
* tools/config.sub: Update to 2013-04-24.
Wed Jun 5 18:01:47 BST 2013 Colin Watson
* lib/pipeline.h (pipecmd_clearenv): Add a warning about use of this
function.
* man/libpipeline.3 (Functions to build individual commands):
Likewise.
Wed Jun 5 10:31:01 BST 2013 Colin Watson
Quieten warnings from compiling Gnulib.
* m4/pipeline-gcc-warning.m4: Remove.
* gnulib: Import warnings module.
* configure.ac: Replace PIPELINE_GCC_WARNING with gl_WARN_ADD.
* lib/Makefile.am (AM_CFLAGS): Add $(WARN_CFLAGS).
* tests/Makefile.am (AM_CFLAGS): Likewise.
Wed Jun 5 10:16:59 BST 2013 Colin Watson
* tests/argstr.c, tests/basic.c, tests/exec.c, tests/inspect.c,
tests/pump.c, tests/reading_long_line.c, tests/redirect.c: Define
program_name (thanks, Fernando Lemos; see Savannah bug #36848).
Wed Jun 5 10:12:29 BST 2013 Colin Watson
* Makefile.in (DIST_COMMON): Regenerate, adding tools/depcomp.
Thu May 30 13:28:08 BST 2013 Colin Watson
Upgrade to Automake 1.13.2 and Gnulib 20130529.
* .bzrignore: Add tests/*.log and tests/*.trs.
* autogen.sh: Drop gnulib/gets.patch backport.
* Makefile.am (EXTRA_DIST): Remove gnulib/gets.patch.
* gnulib/gets.patch: Remove.
* tests/argstr.c, tests/basic.c, tests/exec.c, tests/inspect.c,
tests/reading_long_line.c, tests/redirect.c: Include config.h.
Wed Apr 24 07:48:26 BST 2013 Colin Watson
* Version: 1.2.3.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
3:3:2.
Wed Apr 24 07:44:38 BST 2013 Colin Watson
* lib/pipeline.c (pipeline_wait_all): Free active_pipelines if it is
entirely empty.
Wed Apr 24 07:27:44 BST 2013 Peter Schiffer
* lib/pipeline.c (pipecmd_new_argstr): Fix memory leak when the
first word of argstr is "exec".
* tests/argstr.c (test_argstr_exec): Free cmd at end.
* tests/basic.c (test_basic_wait_all): Free statuses at end.
(test_basic_clearenv): Free p and p2 at end.
* tests/exec.c (test_exec_process, test_exec_function): Free cmd at
end of loop.
* tests/redirect.c (test_redirect_files): Free p and template at
end.
Tue Apr 23 07:52:40 BST 2013 Colin Watson
* lib/pipeline.c (pipecmd_exec): Flush stdio before starting a
sequence.
* NEWS: Document this.
Tue Apr 23 07:50:45 BST 2013 Peter Schiffer
Colin Watson
Don't read uninitialised memory when testing for the end of long
lines (Fedora bug #876108).
* lib/pipeline.c (get_line): Fix incorrect memchr bounds.
* tests/Makefile.am (TESTS): Add reading_long_line.
(reading_long_line_SOURCES, reading_long_line_LDADD): Add.
* tests/reading_long_line.c: New file.
* .bzrignore: Add tests/reading_long_line.
* NEWS: Document this.
Mon Jan 21 11:42:09 GMT 2013 Colin Watson
* configure.ac (AC_HEADER_SYS_WAIT): Remove; superseded by Gnulib.
Mon Jan 21 11:26:15 GMT 2013 Colin Watson
Upgrade to Libtool 2.4.2-1.2 (from Debian).
Mon Dec 24 02:23:37 GMT 2012 Colin Watson
* lib/pipeline.c (pipeline_start): Remove redundant condition.
Mon Sep 17 22:54:12 BST 2012 Colin Watson
* Version: 1.2.2.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
3:2:2.
Mon Sep 17 22:52:58 BST 2012 Colin Watson
* Makefile.am (EXTRA_DIST): Add gnulib/gets.patch.
Mon Sep 17 22:31:18 BST 2012 Colin Watson
* release.sh: Use 'set -e' rather than '#! /bin/sh -e', to avoid
accidents when debugging with 'sh -x'.
Mon Sep 17 22:27:47 BST 2012 Colin Watson
* NEWS: Document changes since 1.2.1.
Mon Sep 17 22:23:59 BST 2012 Colin Watson
* autogen.sh: Use 'set -e' rather than '#! /bin/sh -e', to avoid
accidents when debugging with 'sh -x'.
Mon Sep 17 22:21:44 BST 2012 Křištof Želechovski
* configure.ac: Use AM_PROG_AR before LT_INIT, for compatibility
with Automake 1.12.
Mon Sep 17 22:05:04 BST 2012 Colin Watson
Backport Gnulib commit 66712c23388e93e5c518ebc8515140fa0c807348 to
stop assuming gets.
* gnulib/gets.patch: New file.
* autogen.sh: Apply gnulib/gets.patch.
Mon Sep 17 22:03:09 BST 2012 Colin Watson
Upgrade to Autoconf 2.69, Automake 1.11.6, and Gnulib
20120404-stable.
Sun Mar 4 17:43:21 GMT 2012 Colin Watson
* lib/pipeline.c (pipeline_start): Flush stdio after emitting
debugging output.
Fri Mar 2 19:54:40 GMT 2012 Colin Watson
* Version: 1.2.1.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
3:1:2.
Thu Mar 1 22:51:30 GMT 2012 Colin Watson
* NEWS: Correct date of 1.2.0 release.
Wed Feb 29 20:09:12 GMT 2012 Martin Pollard
* lib/pipeline.h: Enclose in extern "C" { } when compiling as C++.
Wed Feb 29 18:26:22 GMT 2012 Colin Watson
* tests/Makefile.am (TESTS): Add pump.
(pump_SOURCES, pump_LDADD): Add.
* tests/pump.c: New file.
* .bzrignore: Add tests/pump.
Wed Feb 29 18:19:08 GMT 2012 Colin Watson
* lib/pipeline.c (pipeline_start): Create output files if they do
not already exist, and truncate them if they do.
* lib/pipeline.h (pipeline_want_outfile): Document this.
* man/libpipeline.3 (Functions to build pipelines): Likewise.
* tests/common.c: New file.
* tests/common.h (TEST_CASE_WITH_FIXTURE): New macro.
(temp_dir_setup, temp_dir_teardown): Add prototypes.
* tests/redirect.c (test_redirect_outfile): New test.
(redirect_suite): Call test_redirect_outfile.
* tests/Makefile.am (basic_SOURCES, argstr_SOURCES, exec_SOURCES,
inspect_SOURCES, redirect_SOURCES): Add common.c.
* NEWS: Document this.
Mon Feb 27 22:17:20 GMT 2012 Colin Watson
* tests/exec.c (exit_helper, test_exit_function): Add test that
pipecmd_exec works with functions.
(exec_suite): Call test_exit_function.
Thu Feb 9 12:04:26 GMT 2012 Colin Watson
Upgrade to Automake 1.11.3.
Sun Feb 5 02:33:14 GMT 2012 Colin Watson
Upgrade to Automake 1.11.2 and Gnulib 20111211-stable.
* Makefile.am (EXTRA_DIST): Remove gnulib/m4/sockpfaf.m4, which was
removed from this package some time ago. Add gnulib/m4/math_h.m4.
Wed Dec 14 12:54:40 GMT 2011 Colin Watson
* man/Makefile.am (FUNCTIONS): Add pipecmd_new_sequencev,
pipeline_new_command_argv, pipeline_command_argv,
pipeline_wait_all, and pipeline_run.
Wed Dec 14 12:48:56 GMT 2011 Colin Watson
Upgrade to Libtool 2.4.2.
Mon Oct 10 09:22:41 BST 2011 Colin Watson
* README: Document test suite dependencies. Suggested by Bruce
Dubbs.
Mon Sep 26 13:34:00 BST 2011 Colin Watson
* man/libpipeline.3 (Reaping of child processes): Fix typo.
Mon Sep 26 12:10:35 BST 2011 Colin Watson
Upgrade to Gnulib 20110908-stable.
Sat Apr 23 17:51:13 BST 2011 Colin Watson
Upgrade to Autoconf 2.68, Libtool 2.4, and Gnulib 20110412-stable.
Wed Mar 30 13:40:42 BST 2011 Colin Watson
* gnulib: Import full-write, safe-read, and safe-write modules.
* lib/pipeline.c (passthrough): Use safe_read instead of read. Use
full_write instead of fwrite (stdio is not necessarily
EINTR-safe).
(pipeline_pump): Use safe_write instead of write and a manual
EINTR check.
(get_block): Use safe_read instead of read.
* NEWS: Document this.
Fri Mar 18 22:27:39 GMT 2011 Colin Watson
* Version: 1.2.0.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
3:0:2.
Fri Mar 18 18:24:42 GMT 2011 Colin Watson
* man/Makefile.am (FUNCTIONS): Add pipeline_get_pid.
Fri Mar 18 18:22:42 GMT 2011 Colin Watson
* tests/inspect.c (pid_helper): Flush stdout before pausing.
Fri Mar 18 12:08:51 GMT 2011 Colin Watson
* gnulib: Import waitpid module.
Fri Mar 18 12:02:42 GMT 2011 Colin Watson
Upgrade to Gnulib 20110216-stable.
Fri Mar 18 11:45:10 GMT 2011 Colin Watson
* tests/basic.c (test_basic_clearenv): Test that pipecmd_clearenv
and pipecmd_setenv survive pipecmd_dup.
Tue Mar 8 14:10:52 GMT 2011 Colin Watson
Add a function to get process IDs of commands in started pipelines
(Savannah bug #32710).
* lib/pipeline.c (pipeline_get_pid): New function.
* lib/pipeline.h (pipeline_get_pid): Add prototype.
* man/libpipeline.3 (Functions to build pipelines): Document
pipeline_get_pid.
* tests/inspect.c (pid_helper, test_inspect_pid): Test
pipeline_get_pid.
* NEWS: Document this.
Mon Mar 7 10:41:50 GMT 2011 Colin Watson
* configure.ac: Check for working fork(2).
Sat Dec 11 15:01:14 GMT 2010 Colin Watson
* Version: 1.1.0.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Bump -version-info to
2:0:1.
Sat Dec 11 15:00:02 GMT 2010 Colin Watson
* man/Makefile.am (FUNCTIONS): Add pipecmd_get_nargs,
pipecmd_clearenv, and pipecmd_exec.
Sat Dec 11 13:25:29 GMT 2010 Colin Watson
* lib/pipeline.h (pipecmd_get_nargs): Clarify that the command name
is counted as the first argument.
* man/libpipeline.3 (pipecmd_get_nargs): Likewise.
* tests/basic.c (test_basic_args): Correct off-by-one error.
Mon Dec 6 20:54:29 GMT 2010 Colin Watson
* lib/pipeline.c (pipecmd_get_nargs): New function.
* lib/pipeline.h (pipecmd_get_nargs): Add prototype.
* man/libpipeline.3 (Functions to build individual commands):
Document pipecmd_get_nargs.
* tests/basic.c (test_basic_args): Test pipecmd_get_nargs.
* NEWS: Document this.
Mon Dec 6 20:07:43 GMT 2010 Colin Watson
* lib/pipeline.c (pipecmd_clearenv): New function.
(pipecmd_dup, pipecmd_dump, pipecmd_tostring, pipecmd_exec):
Handle cmd->env[i].name being NULL.
* lib/pipeline.h (pipecmd_clearenv): Add prototype.
* man/libpipeline.3 (Functions to build individual commands):
Document pipecmd_clearenv.
* tests/basic.c (test_basic_clearenv): Add test.
(basic_suite): Call test_basic_clearenv.
* NEWS: Document this.
Sun Nov 28 14:49:42 GMT 2010 Colin Watson
* NEWS: Note date of 1.0.0 release.
Sun Nov 28 14:47:03 GMT 2010 Colin Watson
* lib/pipeline.c (pipecmd_start_child): Rename to ...
(pipecmd_exec): ... this, and make external. Update all callers.
* lib/pipeline.h (pipecmd_exec): Add prototype.
* man/libpipeline.3 (Functions to build individual commands):
Document pipecmd_exec.
* tests/Makefile.am (TESTS): Add exec.
(exec_SOURCES, exec_LDADD): Add.
* tests/exec.c: New file.
* .bzrignore: Add tests/exec.
* NEWS: Document this.
Sun Nov 28 13:43:45 GMT 2010 Colin Watson
* gnulib: Remove mkstemp module. Add sys_stat module.
Tue Nov 16 17:25:08 GMT 2010 Colin Watson
* man/libpipeline.3 (EXAMPLES): Clarify pipeline_readline example:
show calls to pipeline_want_out and pipeline_start.
Tue Nov 2 16:56:22 GMT 2010 Colin Watson
* README (Building programs with libpipeline): Recommend -Wformat.
Fri Oct 29 07:34:05 BST 2010 Colin Watson
* Version: 1.0.0.
Fri Oct 29 07:25:14 BST 2010 Colin Watson
* lib/pipeline.h (pipeline_install_post_fork): Clarify that this is
run in the child process.
(pipeline_wait_all): Clarify that SIGPIPE is considered equivalent
to exiting zero.
* man/libpipeline.3 (DESCRIPTION): Update descriptions of
pipeline_install_post_fork and pipeline_wait_all to match this.
(Functions to read output from pipelines): Note that output is
returned as a pointer into a pipeline-owned buffer.
Fri Oct 29 06:21:02 BST 2010 Colin Watson
* TODO: New file.
Fri Oct 29 06:20:18 BST 2010 Colin Watson
* README (Credits): New section.
Fri Oct 29 06:11:37 BST 2010 Colin Watson
* lib/pipeline.c (pipecmd_new_sequencev): New function.
(pipecmd_new_sequence): Rewrite in terms of pipecmd_new_sequence.
(pipeline_new_command_argv): New function.
(pipeline_new_command_args): Rewrite in terms of
pipeline_new_command_argv.
(pipeline_command_argv): New function.
(pipeline_command_args): Rewrite in terms of
pipeline_command_argv.
* lib/pipeline.h (pipecmd_new_sequencev, pipeline_new_command_argv,
pipeline_command_argv): Add prototypes.
* man/libpipeline.3 (DESCRIPTION): Document pipecmd_new_sequencev,
pipeline_new_command_argv, and pipeline_command_argv.
* tests/basic.c (test_basic_sequence): Add test.
(basic_suite): Call test_basic_sequence.
Fri Oct 29 05:25:19 BST 2010 Colin Watson
* lib/pipeline.c (pipeline_wait): Rename to ...
(pipeline_wait_all): ... this. Return 127 rather than 1 if
closing the pipeline output fails. Return 127 if a command other
than the last one fails. Return the statuses and the number of
statuses in new output parameters if they are non-NULL.
(pipeline_wait): Add new wrapper function.
* lib/pipeline.h (pipeline_wait_all): Add prototype.
* man/libpipeline.3 (Functions to run pipelines and handle signals):
Document pipeline_wait_all.
* tests/basic.c (test_basic_wait_all): Add test.
(basic_suite): Call test_basic_wait_all.
Fri Oct 29 03:46:39 BST 2010 Colin Watson
* lib/pipeline.c (pipeline_new): Default ignore_signals to 0.
* man/libpipeline.3 (Functions to build pipelines): Update
pipeline_ignore_signals documentation.
Fri Oct 29 03:43:29 BST 2010 Colin Watson
* man/libpipeline.3 (Functions to build pipelines): Rephrase
description of want_out and want_in handling in terms of public
function calls.
Fri Oct 29 03:30:45 BST 2010 Colin Watson
* man/libpipeline.3 (Functions to build individual commands):
Document variable arguments to pipecmd_new_sequence.
(Functions to build pipelines): Explain analogy of
pipeline_connect to tee(1).
Fri Oct 29 03:13:21 BST 2010 Colin Watson
* lib/pipeline.c, lib/pipeline.h, lib/pipeline-private.h: Rename
command to pipecmd, command_* to pipecmd_*, and COMMAND_* to
PIPECMD_*. Update all callers and documentation references.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Adjust
-export-symbols-regex to export pipecmd_* rather than command_*.
Fri Oct 29 03:00:51 BST 2010 Colin Watson
* man/libpipeline.3 (DESCRIPTION): Various minor corrections and
clarifications from Ian Jackson.
(BUGS): New section.
Tue Oct 26 21:09:53 BST 2010 Colin Watson
* tests/Makefile.am (TESTS): Add argstr.
(argstr_SOURCES, argstr_LDADD): Add.
* tests/argstr.c: New file.
* .bzrignore: Add tests/argstr.
Mon Oct 25 21:56:08 BST 2010 Colin Watson
* tests/inspect.c (test_inspect_command): Free the result of
command_tostring.
(test_inspect_pipeline): Free the result of pipeline_tostring.
Mon Oct 25 20:25:11 BST 2010 Colin Watson
Revert our patched version of xstrdup, since none of libpipeline's
calls to xstrdup rely on being able to pass NULL to it.
* Makefile.am (EXTRA_DIST): Remove gnulib/lib/xmalloc.c.orig and
gnulib/lib/xmalloc.patch.
* autogen.sh: Stop applying gnulib/lib/xmalloc.patch.
* gnulib/lib/xmalloc.c.orig, gnulib/lib/xmalloc.patch: Remove.
Mon Oct 25 20:10:25 BST 2010 Colin Watson
* README (Building programs with libpipeline): New section.
Mon Oct 25 19:39:06 BST 2010 Colin Watson
* man/Makefile.am (FUNCTIONS): Add command_nice,
command_discard_err, command_unsetenv, pipeline_new_command_args,
pipeline_get_ncommands, pipeline_get_command,
pipeline_set_command, pipeline_want_in, pipeline_want_out,
pipeline_want_infile, pipeline_want_outfile, and
pipeline_ignore_signals.
Mon Oct 25 19:31:27 BST 2010 Colin Watson
* tests/basic.c: Include .
Mon Oct 25 19:31:09 BST 2010 Colin Watson
* tests/Makefile.am (TESTS): Add inspect.
(inspect_SOURCES, inspect_LDADD): Add.
* tests/inspect.c: New file.
* .bzrignore: Add tests/inspect.
Mon Oct 25 19:18:35 BST 2010 Colin Watson
* tests/common.h: New file.
* tests/basic.c (basic_suite, main), tests/redirect.c
(redirect_suite, main): Use new TEST_CASE and MAIN macros.
* tests/Makefile.am (basic_SOURCES, redirect_SOURCES): Add common.h.
Mon Oct 25 16:17:24 BST 2010 Colin Watson
* gnulib: Import unsetenv module.
* lib/pipeline.c (command_unsetenv): New function.
(command_dup, command_dump, command_tostring): Check for NULL
cmd->env[i].value.
(command_start_child): If cmd->env[i].value is NULL, call unsetenv
rather than setenv.
* lib/pipeline.h (command_unsetenv): Add prototype.
* man/libpipeline.3 (Functions to build individual commands):
Document command_unsetenv.
* tests/basic.c (test_basic_setenv, test_basic_unsetenv): New tests.
(basic_suite): Call test_basic_setenv and test_basic_unsetenv.
Mon Oct 25 14:31:41 BST 2010 Colin Watson
* gnulib: Import mkstemp module.
* tests/Makefile.am (TESTS): Add redirect.
(LIBPIPELINE): Rename to ...
(LIBS): ... this, and add libgnu and $(LTLIBOBJS).
(AM_CPPFLAGS): Add -I$(top_srcdir)/gnulib/lib and
-I$(top_builddir)/gnulib/lib.
(clean-local): Remove temporary test files.
(basic_LDADD): Use $(LIBS) rather than $(LIBPIPELINE).
(redirect_SOURCES, redirect_LDADD): Add.
* tests/redirect.c: New file.
* .bzrignore: Add gnulib/lib/time.h and tests/redirect.
* lib/Makefile.am (libpipeline_la_CPPFLAGS): Remove spurious
-I$(top_builddir)/include.
Mon Oct 25 14:30:14 BST 2010 Colin Watson
* lib/pipeline.c (pipeline_start): Fix typo that broke
pipeline_want_infile.
Mon Oct 25 13:38:40 BST 2010 Colin Watson
Start test suite.
* lib/Makefile.am (libpipeline_la_LDFLAGS): Remove -module; this
introduces too many complications for now.
* configure.ac: Test for check >= 0.9.4.
(AC_CONFIG_FILES): Add tests/Makefile.
* Makefile.am (SUBDIRS): Add tests if check was found.
* tests/Makefile.am: New file.
* tests/basic.c: New file.
* .bzrignore: Add tests/basic.
Sun Oct 24 22:22:21 BST 2010 Colin Watson
* lib/pipeline.c (command_start_child): Add trailing newline to
"nice failed" debug message.
Sun Oct 24 22:21:20 BST 2010 Colin Watson
Make command and pipeline opaque types.
* lib/pipeline.c (command_nice, command_discard_err,
pipeline_get_ncommands, pipeline_get_command,
pipeline_set_command, pipeline_want_in, pipeline_want_out,
pipeline_want_infile, pipeline_want_outfile,
pipeline_ignore_signals): New functions.
* lib/pipeline.h (command_nice, command_discard_err,
pipeline_get_ncommands, pipeline_get_command,
pipeline_set_command, pipeline_want_in, pipeline_want_out,
pipeline_want_infile, pipeline_want_outfile,
pipeline_ignore_signals): Add prototypes.
* man/libpipeline.3 (DESCRIPTION): Document new functions.
* lib/pipeline.h (enum command_tag, struct command_env, struct
command, struct pipeline): Move to ...
* lib/pipeline-private.h (enum command_tag, struct command_env,
struct command, struct pipeline): ... here.
* man/libpipeline.3 (Public command fields, Public pipeline fields):
Remove.
Redirections are now handled slightly differently internally,
allowing redirection from/to fd 0.
* lib/pipeline.c (pipeline_new, pipeline_join): Set redirect_in and
redirect_out.
(pipeline_connect): Use pipeline_want_in and pipeline_want_out.
Check source->redirect_out.
(pipeline_start): Handle new redirection semantics.
* man/libpipeline.3 (EXAMPLES): Use pipeline_want_infile.
* man/libpipeline.3 (DESCRIPTION): Document string copying.
(Reaping of child processes): New subsection.
Tue Oct 19 01:43:29 BST 2010 Colin Watson
Make debugging work properly in a library context.
* lib/debug.c (init_debug): Check whether we've already been
initialised.
(debug): Call init_debug.
* lib/pipeline-private.h (init_debug): Add prototype.
* lib/pipeline.c (pipeline_start, pipeline_wait): Call init_debug.
Tue Oct 19 01:42:47 BST 2010 Colin Watson
* man/libpipeline.3: Bump licence header to GPLv3, since that more
accurately describes the whole package.
Tue Oct 19 01:41:59 BST 2010 Colin Watson
* man/Makefile.am (install-data-hook): Handle repeated
installations.
(uninstall-hook): Add.
Tue Oct 19 01:39:54 BST 2010 Colin Watson
* lib/pipeline-private.h: Move attribute macros to ...
* lib/pipeline.h: ... here, and make them namespace-safe. Update
all users.
Mon Oct 18 11:32:52 BST 2010 Colin Watson
* lib/pipeline.c (pipeline_run): This would be a more convenient
wrapper for the common case if it freed the pipeline as well, so
do that. (Callers that don't want this should call pipeline_start
and pipeline_wait separately.)
* lib/pipeline.h (pipeline_run): Update comment.
* man/libpipeline.3 (Functions to build pipelines): Update
pipeline_run documentation.
(EXAMPLES): Remove now-unnecessary calls to pipeline_free.
Mon Oct 18 11:29:11 BST 2010 Colin Watson
* lib/pipeline.c (pipeline_new_command_args): New function.
* lib/pipeline.h (pipeline_new_command_args): Add prototype.
* man/libpipeline.3 (Functions to build pipelines): Add
pipeline_new_command_args.
(EXAMPLES): Use this to describe the simplest case.
Mon Oct 18 11:10:27 BST 2010 Colin Watson
* lib/pipeline.c (pipeline_run): New function.
* lib/pipeline.h (pipeline_run): Add prototype.
* man/libpipeline.3 (Functions to run pipelines and handle signals):
Add pipeline_run.
(EXAMPLES): Use it.
Mon Oct 18 11:07:16 BST 2010 Colin Watson
* man/libpipeline.3 (DESCRIPTION): Add some more paragraph breaks.
Fri Oct 15 10:26:02 BST 2010 Colin Watson
* lib/libpipeline.pc.in: Add copyright/licensing comment.
* man/libpipeline.3: Add brief licensing comment.
Thu Oct 14 00:49:34 BST 2010 Colin Watson
* README (Copyright and licensing): Bump to GPLv3 or later, for
clarity. (lib/* remains licensed under GPLv2 or later, but the
work as a whole is GPLv3 or later.) Move further advice to ...
(Note on GPL versions): ... here, and expand.
Tue Oct 12 01:12:13 BST 2010 Colin Watson
* README: New file.
* INSTALL: New file.
Tue Oct 12 01:01:04 BST 2010 Colin Watson
* COPYING: New file.
* autogen.sh: Add a copyright/licence notice.
* configure.ac: Likewise.
* lib/pipeline-private.h: Update copyright years.
Tue Oct 12 00:52:00 BST 2010 Colin Watson
* man/libpipeline.3: Add a licence notice.
Tue Oct 12 00:27:01 BST 2010 Colin Watson
* autogen.sh: Stop setting AUTOPOINT=true.
* configure.ac: Stop echoing DBLIBS (specific to man-db).
Tue Oct 12 00:22:00 BST 2010 Colin Watson
* configure.ac: Remove check for gnulib/po/Makefile.in.in.
Tue Oct 12 00:17:53 BST 2010 Colin Watson
Remove gettext support. It's overkill for a library considering
that we only emit error messages, and it vastly inflates the size of
our configuration requirements.
* Makefile.am (SUBDIRS): Remove gnulib/po and po.
(EXTRA_DIST): Remove everything except gnulib/m4/sockpfaf.m4.
* autogen.sh: Remove call to autopoint and removal of po/ChangeLog.
* configure.ac: Remove calls to AM_GNU_GETTEXT and
AM_GNU_GETTEXT_VERSION. Stop substituting LINGUAS.
(AC_CONFIG_FILES): Remove gnulib/po/Makefile.in and
po/Makefile.in.
* gnulib/m4/gnulib-cache.m4: Remove --po-base and --po-domain
options. Remove gettext module.
* lib/Makefile.am (libpipeline_la_LIBADD): Remove @LTLIBINTL@.
* lib/pipeline.c (command_new_argstr, command_start_child),
pipeline_get_infile, pipeline_get_outfile,
pipeline_install_sigchld, pipeline_start, pipeline_wait,
pipeline_pump): Remove gettext support.
* po/*: Remove.
* .bzrignore: Remove gnulib/po and po/*.
Mon Oct 11 21:25:37 BST 2010 Colin Watson
* autogen.sh: Remove po/ChangeLog after running autoreconf.
* .bzrignore: Remove po/ChangeLog.
* Makefile.am (EXTRA_DIST): Add gnulib/m4/codeset.m4,
gnulib/m4/fcntl-o.m4, and gnulib/m4/glibc21.m4.
* po/LINGUAS: New file.
Mon Oct 11 18:19:37 BST 2010 Colin Watson
* man/Makefile.am (man3_MANS): Move to ...
(dist_man3_MANS): ... here.
Mon Oct 11 17:51:16 BST 2010 Colin Watson
* Makefile.am (SUBDIRS): Add man.
* configure.ac (AC_PROG_LN_S): Add.
(AC_CONFIG_FILES): Add man/Makefile.
* man/Makefile.am: New file.
* man/libpipeline.3: New file.
Mon Oct 11 16:38:29 BST 2010 Colin Watson
* lib/pipeline.h (pipeline_pump): Mention in comment that arguments
must be NULL-terminated.
Mon Oct 11 14:10:54 BST 2010 Colin Watson
* lib/pipeline.h (pipeline_new_commandv): Fix comment.
Thu Oct 7 08:05:41 BST 2010 Colin Watson
* lib/libpipeline.pc.in: New file.
* configure.ac (AC_CONFIG_FILES): Add lib/libpipeline.pc.
* lib/Makefile.am (pkgconfigdir, pkgconfig_DATA): Install
libpipeline.pc to $(libdir)/pkgconfig.
* .bzrignore: Add lib/libpipeline.pc.
Thu Oct 7 07:56:27 BST 2010 Colin Watson
* po/libpipeline.pot: Update.
* po/*.po: Import translations from man-db.
Thu Oct 7 07:54:12 BST 2010 Colin Watson
* lib/Makefile.am (libpipeline_la_SOURCES): Add pipeline-private.h.
Thu Oct 7 07:49:46 BST 2010 Colin Watson
* release.sh: New file, from man-db.
Thu Oct 7 07:48:12 BST 2010 Colin Watson
Build independently from man-db. Many new files from gettextize,
gnulib-tool, and autoreconf.
* lib/appendstr.c: New file, from man-db.
* lib/debug.c: Likewise.
* m4/pipeline-gcc-warning.m4: Likewise.
* m4/pipeline-socketpair.m4: Likewise.
* lib/pipeline-private.h: New file.
* lib/pipeline.c (command_new_argstr): Use strcmp rather than STREQ.
(pipeline_install_post_fork): New function.
(pipeline_start): Call post-fork handler rather than hardcoding
pop_all_cleanups.
* lib/pipeline.h (pipeline_install_post_fork): Add prototype.
* lib/pipeline.c: Update copyright notice for libpipeline.
* lib/pipeline.h: Likewise.
* gnulib: Import dirname, error, gettext, lib-ignore, setenv,
sigaction, signal, sigprocmask, strerror, strsignal, sys_select,
xalloc, xstrndup, and xvasprintf modules.
* Makefile.am: New file.
* NEWS: New file.
* autogen.sh: New file.
* configure.ac: New file.
* lib/Makefile.am: New file.
* .bzrignore: New file.
Entries below this point are edited versions of entries in man-db.
Sun Oct 3 23:57:45 BST 2010 Colin Watson
* lib/pipeline.c (command_argf): New function.
* lib/pipeline.h (command_argf): Add prototype.
Sun Oct 3 22:34:13 BST 2010 Colin Watson
* lib/pipeline.c (reap_children, pipeline_sigchld,
pipeline_install_sigchld): Move above pipeline_start.
(pipeline_install_sigchld): Make static. Return immediately if
already installed.
(pipeline_start): Call pipeline_install_sigchld.
* lib/pipeline.h (pipeline_start): Document that this installs a
SIGCHLD handler.
(pipeline_install_sigchld): Remove prototype.
Tue Mar 2 10:04:54 GMT 2010 Colin Watson
Fix assertion failure on 'man -l' with an uncompressed page and
prefixed input (no-hyphenation, no-justification, or a non-English
page).
* lib/pipeline.c (command_new_passthrough): New function.
* lib/pipeline.h (command_new_passthrough): Add prototype.
Mon Feb 1 12:18:36 PST 2010 Colin Watson
* lib/pipeline.c (pipeline_wait): Don't bother printing error
messages for SIGINT and SIGQUIT, since these correspond to
explicit user actions (Debian bug #568000).
Wed Jan 13 23:42:00 GMT 2010 Werner Fink
Add support for using socketpair(2) as a replacement for pipe(2),
which is faster on some systems (Savannah patch #6741).
* lib/pipeline.c [USE_SOCKETPAIR_PIPE]: Redefine pipe() to a
construction based on socketpair().
Tue Jan 12 13:33:51 GMT 2010 Samuel Thibault
* lib/pipeline.c (pipeline_pump): Fix off-by-one error when write
returns EAGAIN (Debian bug #564818).
Sat Nov 14 18:52:15 GMT 2009 Colin Watson
* lib/pipeline.c (argstr_get_word): Fix a small memory leak.
Sat Nov 14 10:23:28 GMT 2009 Colin Watson
* lib/pipeline.c (command_new_sequence, command_sequence_command):
New functions.
(command_dup, command_dump, command_tostring, command_free):
Handle commands of type COMMAND_SEQUENCE.
(pipeline_start): Move command execution to ...
(command_start_child): ... here (new function). Handle commands of
type COMMAND_SEQUENCE.
* lib/pipeline.h (enum command_tag): Add COMMAND_SEQUENCE.
(struct command): Add support for commands that consist of a
sequence of commands.
(command_new_sequence, command_sequence_command): Add prototypes.
Thu Sep 24 12:32:48 BST 2009 Colin Watson
* lib/pipeline.c (pipeline_pump): When a source pipeline dies, make
sure to drain its output before discarding its output file
descriptor (Debian bug #548153). We still record the death to
avoid duplicate debugging messages.
Sun Aug 23 15:49:45 BST 2009 Colin Watson
* lib/pipeline.c (command_dup): Fix newcmd->nenv assertion.
Sun Aug 23 15:41:32 BST 2009 Colin Watson
* lib/pipeline.c (command_dup, command_setenv): cmd->env does not
need to be { NULL, NULL }-terminated.
Sun Aug 23 00:04:56 BST 2009 Colin Watson
* lib/pipeline.c (command_setenv): New function, allowing
application code to ask for environment variables to be set when a
command is executed.
(command_new, command_new_function, command_dup, command_dump,
command_tostring, command_free): Handle new nenv, env_max, and env
members of 'struct command'.
(argstr_get_word): Add TODO comment for environment variable
support.
(pipeline_start): Set environment variables as requested.
* lib/pipeline.h (struct command_env): New structure.
(struct command): Add nenv, env_max, and env members.
(command_setenv): Add prototype.
Sun Jun 28 01:47:51 BST 2009 Colin Watson
* lib/pipeline.c (pipeline_free): Free buffer and line_cache.
Sun Jun 28 01:40:24 BST 2009 Colin Watson
* lib/pipeline.c (get_line): Limit newline search to the data length
returned by get_block, fixing an assertion failure.
Sat May 30 12:50:44 BST 2009 Colin Watson
* lib/pipeline.c (pipeline_start): Check the return value of nice.
Mon Nov 17 11:07:50 GMT 2008 Colin Watson
* lib/pipeline.c (command_new_function): Initialise discard_err.
(pipeline_start): Zero-initialise pids and statuses arrays on
allocation, and don'\''t unblock SIGCHLD until after doing so.
Mon Nov 17 00:39:14 GMT 2008 Colin Watson
* lib/pipeline.c (pipeline_wait): Mangle return value into a value
suitable for passing to exit (Debian bug #477305).
Mon Sep 8 09:09:06 BST 2008 Colin Watson
Add support for freeing command_function data.
* lib/pipeline.c (command_new_function): Add free_func argument.
(command_dup): Copy it.
(pipeline_connect): Adjust command_new_function call.
(pipeline_start): Free command_function data before exiting.
(pipeline_wait): Free command_function data while cleaning up
pipeline.
* lib/pipeline.h: Add command_function_free_type typedef.
(struct command [struct command_function]): Add free_func member.
(command_new_function): Update prototype.
Thu Jul 31 00:51:58 BST 2008 Colin Watson
* lib/pipeline.c (pipeline_pump): Free known_source before returning
(Coverity CID #15).
Sun May 4 23:16:59 BST 2008 Colin Watson
* lib/pipeline.c (pipeline_start, pipeline_pump): Zero sigaction
structures before using them. (I believe we set all required
fields anyway; this is just an extra safety catch.)
Sun Apr 27 11:24:24 BST 2008 Colin Watson
* lib/pipeline.c (pipeline_sigchld): assert is not
async-signal-safe, so avoid calling it in a signal handler and use
an if guard instead (Ubuntu bug #221635, although exactly why the
assertion is failing there is unclear).
Sun Feb 17 17:13:55 GMT 2008 Colin Watson
* lib/pipeline.c (pipeline_wait): Call strsignal rather than
xstrsignal.
Sun Jan 27 13:42:31 GMT 2008 Colin Watson
* lib/pipeline.c (pipeline_join): Initialise source, buffer, buflen,
bufmax, line_cache, and peek_offset.
Sun Jan 27 13:37:17 GMT 2008 Colin Watson
* lib/pipeline.h (struct pipeline): Add ignore_signals member.
* lib/pipeline.c (pipeline_new): Initialise ignore_signals to 1.
(pipeline_join): Set ignore_signals if either input pipeline has
it set.
(pipeline_start): Only ignore SIGINT and SIGQUIT if ignore_signals
is set.
(pipeline_wait): Only restore SIGINT and SIGQUIT if ignore_signals
is set.
Sun Jan 6 15:01:08 GMT 2008 Colin Watson
* lib/pipeline.c (pipeline_start, pipeline_wait,
pipeline_install_sigchld, pipeline_pump): Call sigaction rather
than xsigaction.
Wed Jan 2 23:30:33 GMT 2008 Colin Watson
* lib/pipeline.c (passthrough): Use STDIN_FILENO, STDOUT_FILENO, and
STDERR_FILENO macros rather than calling fileno.
Mon Dec 31 10:02:28 GMT 2007 Colin Watson
* lib/pipeline.c (passthrough): New helper function.
(pipeline_connect): Add special (kludge) handling for zero-command
sinks.
(pipeline_pump): Add minor commentary.
Wed Oct 17 21:05:50 BST 2007 Colin Watson
* lib/pipeline.c: Assume and . Remove
duplicate inclusion.
(command_new): Use base_name.
Mon Oct 8 02:24:19 BST 2007 Colin Watson
* lib/pipeline.c (get_block): Use xrealloc instead of realloc.
Mon Oct 8 02:09:55 BST 2007 Colin Watson
The strappend function is in the namespace reserved by C99
7.26.10/7.26.11; rename it to appendstr.
* lib/pipeline.c: Update all callers.
Mon Sep 17 00:11:38 UTC 2007 Colin Watson
* lib/pipeline.c (pipeline_start): Break after execvp, otherwise we
segfault if execvp fails.
Fri Aug 31 04:54:45 BST 2007 Colin Watson
* lib/pipeline.c (pipeline_free): Call pipeline_wait if the pipeline
is still running.
* lib/pipeline.h (pipeline_free): Document that this may happen.
Tue Aug 28 17:19:16 BST 2007 Colin Watson
Implement and use a decompression library. This allows cat pages to
be saved in the background (Debian bug #18452) and operation with a
read-only /tmp (Debian bug #165499).
* lib/pipeline.h (struct command): Add support for commands that
consist of calling a function rather than executing a process.
(struct pipeline): Add want_infile and want_outfile members. Note
that infile and outfile default to NULL. Add source, buffer,
buflen, bufmax, line_cache, and peek_offset members.
(command_new_function, command_dump, command_tostring,
pipeline_connect, pipeline_pump, pipeline_read, pipeline_peek,
pipeline_peek_size, pipeline_peek_skip, pipeline_readline,
pipeline_peekline): New prototypes.
(pipeline_join): Update description for want_infile and
want_outfile.
* lib/pipeline.c (command_new, command_dup, command_arg,
command_argv, command_args, command_argstr, command_free): Update
for 'struct command' changes.
(command_new_function, command_dump, command_tostring): New
functions.
(pipeline_new, pipeline_join, pipeline_dump, pipeline_tostring):
Update for 'struct pipeline' changes.
(pipeline_dump): Use command_dump.
(pipeline_tostring): Use command_tostring.
(pipeline_start): Implement want_infile, want_outfile, and
function commands. Make zero-command case work properly (read
directly from input file). Flush all pending stdio output so that
subprocesses don't inherit it.
(pipeline_connect, pipeline_pump, get_block, pipeline_read,
pipeline_peek, pipeline_peek_size, pipeline_peek_skip, get_line,
pipeline_readline, pipeline_peekline): New functions.
Mon Aug 27 20:02:17 BST 2007 Colin Watson
* lib/pipeline.c (pipeline_wait): Re-raise SIGINT or SIGQUIT if they
terminate a subprocess.
Mon Aug 27 19:58:19 BST 2007 Colin Watson
* lib/pipeline.c (pipeline_wait): Return 1 if we fail to close the
pipeline's output.
Mon Aug 20 00:10:49 BST 2007 Colin Watson
Discard stderr from formatting processes when outputting to a pager,
to avoid visual corruption from any error messages (thanks, Vincent
Lefevre; Debian bug #372939).
* lib/pipeline.h (struct command): Add discard_err member.
* lib/pipeline.c (command_new, command_dup): Initialise discard_err.
(pipeline_start): Redirect the child's stderr to /dev/null if
discard_err is set.
Sun Mar 4 00:51:30 GMT 2007 Colin Watson
Eliminate variable and function shadowing.
* lib/pipeline.c (pipeline_start): Remove duplicate declarations of
set and oset.
Wed Feb 28 22:04:04 GMT 2007 Colin Watson
* lib/pipeline.c (pipeline_start): Close inputs and outputs from
other active pipelines in all subprocesses.
Wed Feb 28 21:57:24 GMT 2007 Colin Watson
* lib/pipeline.c (pipeline_start): Don't ignore SIGPIPE in
subprocesses; this has undesirable consequences in some
situations.
(pipeline_wait): Flatten SIGPIPE exit statuses to zero instead.
Tue Feb 27 20:58:31 GMT 2007 Colin Watson
* lib/pipeline.c (pipeline_start): Save previous value of SIGQUIT
such that it gets restored as SIGQUIT, not as SIGINT.
Mon Jan 8 10:39:24 GMT 2007 Colin Watson
* lib/pipeline.c (pipeline_start, pipeline_wait,
pipeline_install_sigchld): Use xsigaction instead of
sigaction-plus-EINTR-check.
Tue Dec 26 14:27:59 GMT 2006 Colin Watson
* lib/pipeline.c: Include "gettext.h" rather than . Make
sure not to include before "gettext.h", for portability
to Solaris.
Sun Sep 17 09:20:33 BST 2006 Colin Watson
* lib/pipeline.c (pipeline_start): Ignore SIGPIPE in child processes
(Debian bug #387864).
Wed Feb 22 09:44:02 GMT 2006 Colin Watson
* lib/pipeline.c (command_new_argstr): Skip "exec" at the start of a
command, to make old configuration files work (Debian bug
#353959).
Wed Sep 21 10:56:22 BST 2005 Colin Watson
* lib/pipeline.c (pipeline_wait): Queue SIGCHLD for the whole time
we're collecting child process statuses; we need to keep a careful
count of processes. Forget any previous errno before calling
reap_children. Should fix Debian bug #326488.
Wed Sep 21 10:10:12 BST 2005 Colin Watson
* lib/pipeline.c (pipeline_start, pipeline_wait): Ignore SIGINT and
SIGQUIT in the parent while running subprocesses (Debian bug
#328982).
Thu Sep 1 14:10:07 BST 2005 Colin Watson
* lib/pipeline.c (argstr_get_word): Use an enum for quotemode rather
than magic numbers.
Mon Jul 11 18:12:58 BST 2005 Colin Watson
* lib/pipeline.c (pipeline_wait): Emit a debugging message.
Mon Jul 11 14:41:52 BST 2005 Colin Watson
* include/manconfig.h.in: Define ATTRIBUTE_SENTINEL to a function
attribute enabling sentinel checking if using GCC 4.0 or newer.
(strappend): Use it.
* lib/pipeline.h (command_new_args, command_args,
pipeline_new_commands, pipeline_command_args, pipeline_commands):
Likewise.
Sun Dec 12 21:48:04 CET 2004 Colin Watson
* lib/pipeline.c (pipeline_sigchld): Don't bother saving and
restoring errno if SIGCHLD is being queued.
Sun Nov 7 16:07:26 GMT 2004 Colin Watson
* lib/pipeline.c (pipeline_wait): Close pipeline output before
reaping processes, so that writing processes get SIGPIPE.
Sun Nov 7 16:05:08 GMT 2004 Colin Watson
* lib/pipeline.c (pipeline_wait): Fix active process debugging
output to include processes without statuses.
Mon Mar 8 11:21:05 GMT 2004 Colin Watson
* lib/pipeline.c (pipeline_dump): Show caller-supplied input and
output file descriptors.
* lib/pipeline.c (command_free, pipeline_free): Return safely if
argument is NULL.
* lib/pipeline.h (command_free, pipeline_free): Document NULL
arguments as a safe no-op, like free().
Sun Sep 21 02:17:43 BST 2003 Colin Watson
* lib/pipeline.c (pipeline_start): Dump pipeline in debugging mode.
Thu Aug 28 00:40:09 BST 2003 Colin Watson
* lib/pipeline.c (pipeline_start): Change "couldn't exec %s" to
"can't execute %s" in line with src/man.c, to make translators'
lives easier.
(pipeline_wait): Separate "%s: %s%s" into two translatable
strings: the "(core dumped)" portion should definitely be
translated.
Fri Aug 15 18:05:37 BST 2003 Colin Watson
* lib/pipeline.c: Include instead of relying on
basename() prototype in manconfig.h.
Sat Aug 9 18:28:01 BST 2003 Colin Watson
Replace the old "wait() for one child at a time" approach with a
SIGCHLD-handling edifice that collects children's exit statuses as
they die.
* lib/pipeline.c (pipeline_new): Initialize statuses.
(pipeline_join): Set statuses to NULL in joined pipeline.
(pipeline_join, pipeline_get_infile, pipeline_get_outfile,
pipeline_start, pipeline_wait): Assert that statuses field is NULL
or non-NULL as appropriate.
(pipeline_free): Free statuses if necessary.
(pipeline_start): Add p to a new active_pipelines array, to be
used while reaping children. Initialize statuses elements to -1.
Block SIGCHLD while forking children.
(reap_children): New function. Delivers collected exit statuses
into statuses fields of entries in active_pipelines.
(pipeline_wait): Rather than wait()ing manually here, check
whether any statuses have been picked up by the SIGCHLD handler,
and if not call reap_children(). Remove now-obsolete TODO comment.
(pipeline_sigchld): New function, the SIGCHLD handler.
(pipeline_install_sigchld): New function, to be called once per
program.
(pipeline_start, pipeline_wait): Add minimal debugging
information.
* lib/pipeline.h: Prototype new functions.
(struct pipeline): New statuses member.
Sat Aug 9 17:00:12 BST 2003 Colin Watson
* lib/pipeline.c (command_dup): Copy cmd->nice.
(pipeline_command): Correct condition for growing commands array.
Mon Aug 4 19:35:26 BST 2003 Colin Watson
* lib/pipeline.c (command_dup): Terminate argv with a NULL.
(command_dup, command_arg): Assert that argc < argv_max after
changing either.
Mon Aug 4 19:30:22 BST 2003 Colin Watson