Skip to content

Releases: rajatjain1997/subprocess

v0.1.1

22 Sep 11:36
Compare
Choose a tag to compare

Summary

This is a bugfix release.

Changes

Added

  • exceptions::os_error now contains the error code and error messages from syscalls

Modified

  • file_descriptor creates files with the correct umask and permissions
  • Only file descriptors marked as FD_CLOEXEC are closed by the OS when a child process is executed

Removed

  • No special handling for closing file descriptors in the child process. Any fd that needs to be closed on exec should be marked FD_CLOEXEC

Contributors

v0.1.0

19 Sep 07:38
Compare
Choose a tag to compare

Summary

This is the first release of subprocess after its announcement on reddit last week.

Changes

Added

  • The library is now header-only. Consequently, no build-system like cmake is required.
  • Added the _cmd literal to construct subprocess::command class.
  • operator| for subproess::cmd is now overloaded for std::string. This eliminates the need for adding _cmd to every command while piping.
  • descriptor_ptr_t and descriptor_ptr helper types to create descriptors
  • nothrow alternative for command::run

Modified

  • Heavily reworked the descriptor framework. All I/O from posix_process is done using descriptors. Users can now add their own descriptors by deriving from odescriptor or idescriptor classes.
  • posix_spawnp is used in place of exec() + fork() to allow for greater flexibility while porting to windows.
  • subprocess::command now excepts strings instead of an initializer_list of char*. Automatic shell expansion is performed on the string using wordexp syscall.
  • Output redirection is now exactly shell-like. To facilitate this, subprocess::in, subprocess:out, and subprocess:err now correspond to tags that allow you to point posix_process file descriptors to each other.

Removed

  • subprocess::command can no longer be constructed using a delimited initializer list of arguments