PStreams

PStreams allows you to run another program from your C++ application and to transfer data between the two programs, similar to shell pipelines. In the simplest case, a PStreams class is like a C++ wrapper for the POSIX.2 functions popen(3) and pclose(3), using C++ IOStreams instead of C's stdio library. The library provides class templates in the style of the standard IOStreams that can be used with any standard-conforming C++ compiler on a POSIX platform. The classes use a streambuf class that uses fork() and the exec family of functions to create a new process and to write/read data to/from the process.

Tags Software Development Utilities
Licenses LGPL
Operating Systems POSIX
Implementation C++

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  11 Jun 2005 08:08
  • Rrelease-after

Changes: This release adds support for streambuf::in_avail() for platforms that support the FIONREAD ioctl request (known to work on Linux, FreeBSD, and Solaris). It is now possible to detect when the shell command failed to execute, as long as you open the pstream using the functions taking argv_type. If the command is not found or cannot be executed, pstreambuf::is_open() will return false. This makes it possible to distinguish the cases in which the command cannot be run and when it runs but exits with an error.

  • Rrelease-mid
  •  17 Oct 2004 23:19
  • Rrelease-after

Changes: This release includes several non-trivial bugfixes and some minor code improvements. New argv_type and fd_type typedefs have been added (fd_t is deprecated). Documentation has been cleaned up to be more consistent and complete.

  • Rrelease-mid
  •  24 Sep 2004 17:14
  • Rrelease-after

No changes have been submitted for this release.

9b05239d80de5665840ba1d2a276f00a_thumb

Project Spotlight

Maarch LetterBox

A mail-management-oriented DMS application based on Maarch Framework.

No-screenshot

Project Spotlight

Web-bench

Simple web server benchark.