system-posix-redirect: A toy module that allows you to temporarily redirect a program's stdout.

[ bsd3, library, system ] [ Propose Tags ]

Due to the design of POSIX, it is possible to temporarily overload the file descriptors corresponding to stdout and stderr to point to an arbitrary pipe. It is, however, tricky to get right. This module gets it right, as far as such a terrible hack can be made right. It can be used to make misbehaving third-party C libraries stop spewing to standard output. Warning: the module author has concluded that due to lack of portability, this module should not be used in any serious sytem. But, for those who like living dangerously...

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0, 1.0.0.1, 1.1, 1.1.0.1
Dependencies base (>=4 && <5), bytestring (>=0.9), unix (>=2.4.0) [details]
License BSD-3-Clause
Copyright (c) 2010 Galois Inc.
Author Galois Inc.
Maintainer ezyang@galois.com
Category System
Source repo head: git clone https://github.com/liyang/system-posix-redirect
Uploaded by LiyangHu at 2013-09-05T10:55:47Z
Distributions Debian:1.1.0.1, NixOS:1.1.0.1
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 4726 total (18 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]