Revision history for Perl extension IPC::Run

20231003.0 Mon Oct 2 2023
 Windows now matches other platforms in that a child calling exit(N) causes
 result() to return N and full_result() to return N << 8.  On Windows, before
 this change, result() was returning N >> 8, and full_result() was returning N.
 Programs having workarounds for this may need to condition those workarounds on
 - #157 - On Windows, avoid hang under IPCRUNDEBUG.
 - Refresh "cpanfile" from Makefile.PL, to allow use on Windows.
 - #163 - Normalize shebangs to /usr/bin/perl
 - Fix or skip all tests recently seen to fail on Windows.
 - Include t/result.t in releases.
 - #168 - Make full_result() and result() Windows behavior match non-Windows.

20220807.0 Mon Aug 1 2022
 If your applications rely on portability to Windows, see new documentation
 sections "argument-passing rules are program-specific" and "batch files".  This
 release fixes bugs in runs of Windows programs that use standard command line
 parsing rules.  Runs of non-standard programs may require changes.  Notable
 non-standard programs include cmd.exe, cscript.exe, and Cygwin programs.
 - #140 - skip t/pty.t test on NetBSD too
 - Add strict/warnings
 - #142 - Follow Windows argument quoting rules
 - #146 - allow win32_newlines.t to actually run
 - #150 - Make t/pty.t test pass on OpenBSD.
 - #148 - Support Win32 commands having nonstandard command line parsing rules
 - Support executing Win32 batch files.
 - Add IPC::Run::Win32Process, for delivering nonstandard command lines.
 - Fix reporting of Win32::Process::Create() errors.
 - #156 - On Windows, avoid hang when closing read end of pipe.
 - #155 - Ignore known test failure on msys. - t/windows_search_path.t
 - Avoid warning with IPCRUNDEBUG, in Windows spawned children.
 - Use $^X, not 'perl', in tests.
 - Thanks to the New active developer: Noah Misch!

20200505.0 Tue May 5 2020
 - #125 - Fix syntax errors in POD examples
 - #127 - Switch Readonly testing requirement to a recommends
 - #129 - Fix full_result to always return $?
 - #136 - kill_kill: Immediately KILL the child process as documented for Win32.
 - Switch to github actions for CI testing
 - Re-structure shipped files into eg
 - Move author tests into xt and test them separately.

20180523.0 Wed May 23 2018
 - #99 - Fix using fd in child process when it happens to be the same number in
   the child as it was in the parent.

0.99 Fri Mar 30 2018
 - Fixes for windows unit tests so they skip or pass.

0.98 Thu Mar 29 2018
 - Switch to using $!{EINTR}
 - Honor umask for user/group permissions on a +rw file
 - Remove commented code from RT 50739
 - #63 - Patch for fixing _write on invalid objects
 - #54 - Make slave the controlling terminal so more programs can be called from IPC::Run reliably
 - #53 - Prevent Not a GLOB reference in close_terminal by untieing before close
 - #46 - '&' closing the stdin of the right process.
 - #41 - Do POSIX::_exit not ::exit
 - #40 - Assure child Win32 processes have same priority as parent
 - #38 - Add unit test for passing use of
 - #39 - Fix GLOB test in IPC::Run::IO->new
 - #86 - Fix for memory leak [ #57990]
 - MANIFEST was updated. New tests may start shipping now.

0.97 Mon Mar 26 2018
 - Update meta and POD to point to GitHub issues not RT.
 - Update README with pod changes.
 - Fix variable name in synopsis - [Github #47]
 - Fix t/run.t to work on "perl in space" - [Github #100]

0.96 Fri May 12 2017
 - Update bug tracker to

0.95 Mon Apr 24 2017
 - Spelling fixes
 - doc fix: full_result returns $?, not $? >> 8
 - Fix check for reaped PID in reap_nb
 - Re-remove unnecessary use of UNIVERSAL

0.94_02 Thu Apr 14 2016
 - Skip infinity test on perl below 5.8.9

0.94_01 Tue Apr 12 2016
 - Enable Travis-CI integration for IPC::Run
 - Use q{} and qq{} to fix problems with quotation in cmd.exe
 - sync $VERSION across all files to address kwalitee
 - RT 109243 - Stop side affect of altering flushing of STDOUT and STDERR
 - CHILD_HANDLE should be closed with 'Close' to prevent a warning.
 - require Win32API::File on Windows
 - Better timer error message + an additional unit test
 - Catching previously non-detected malformed time strings
 - Let Timer accept all allowable perl numbers
 - allow the OS to choose the ephemeral port to use
 - Don't use to parse the perl version in Makefile.PL
 - perltidy
 - Do not import POSIX into local namespace (it's a memory hog)

0.94 Sun Dec 14 2014
 - RT 100858 - Update License discrepancies.

0.93_01 Wed Dec 10 2014
 - Many typo corrections from David Steinbrunner via github
 - RT 20105 - t/pty.t fails on Solaris 10

0.93 Wed Dec 10 2014
 - RT 100711 - Add aggressive exit to t/signal.t after skip_all to prevent failures.
 - RT 97926 - Fix for run argument with spaces in path
 - skip t/win32_compile.t on Android
 - RT 86133 - TODO failing POD tests for IPC::Run

0.92 Thu Aug 30 2012
 - Tests are good in dev version. Releasing to stable.

0.92_01 Wed 22 Aug 2012
 - RT 59775 - Catching a signal during select() can lock up IPC::Run

0.91 Tue 14 Feb 2012
 - Tests are good in dev version. Releasing to stable.

0.91_01 Mon 16 Jan 2012
 - RT 57277 - Apply suggested 1 line fix for dev release to public.

0.90 Wed 29 Jun 2011
 - RT 57277 - Add breaking test. No solution at present.
 - RT 68623 - disable parallel tests on windows
 - RT 43072 - Skip dragonfly platform on t/pty.t (hangs)
 - RT 14078 - run() miscalculates length of UTF-8 strings
 - RT 49693 - security patch for lib/IPC/Run/ s/INADDR_ANY//
 - RT 38193 - Fix error detection on non-English operating systems
 - Add a blank doc entry for IPC::Run::Win32IO::poll to quiet windows pod parser errors
 - RT 57190 - handle PATH environment variable not being defined. WILL NOT default to '.' since UNIX would not do this and the program has been behaving the UNIX way to date.

0.89 Wed 31 Mar 2010
  - Revert extended tests to require "oslo consensus" variables -
  - Add IO::Pty to META.yml requirement This has been inconsistently depended on over the years in META.yml

0.88 Tue 30 Mar 2010
  - Missed dangling isa in IPC::Run::Debug
  - Fix retry for read of fh when I get "Resource temporarily unavailable."
    It was previously pounding on the file handle with no rest 200 times then giving up.
    On fast systems this wasn't long enough. I'm implementing select(undef, undef, 0.01)
    to provide a more consistent retry among hardware and os.
  - Fix POD indentation in

0.87 Mon 29 Mar 2010
  - Add doc type fixes - RT 56030 from carnil (Debian)
  - Remove recommends for AUTHOR only modules
  - add pod_coverage and simplify pod test.
  - document undocumented public subs with TODO and best guess as to what they do.
  - Explicitly recommend IO::Pty version number 1.08

0.86 Wed 24 Mar 2010
  - Add all files to subversion for easier releases
  - bump version on ALL files to 86

0.85 Mon 22 Mar 2010
  - Remove use UNIVERSAL. - RT 51509
  - fix pod for Win32Helper - RT 51695
  - Better PATHEXT logic bug if cmd_name contains periods - RT 50739
  - Enhance tests for run.t for better diagnostics - RT 47630

0.84 Mon 13 Jul 2009
	- Add darwin to the list of known-bad platforms

0.83 Fri 10 Jul 2009
	- Switch from to cmd.exe so we work on 2008 or newer.

0.82 Thu 18 Dec 2008
	- Moving changes in 0.81_01 to a production release

0.81_01 Wed 15 Oct 2008
	- This is the first in a series of refactoring test releases.
	- Removed Makefile.PL message noisily asking users to do CPAN Testers
	  dirty work.
	- Simplified the Makefile.PL code a little.
	- Upgraded all tests to Test::More
	- Added a $VERSION for all modules
	- Adding some missing POD sections
	- Various other clean ups

0.80 (missing)
	- IPC::Run::IO now retries on certain "temporarily unavailable" errors.
	  This should fix several reported issues with t/run.t, test 69.
	  Many thanks to < Eric (at) Scratch Computing (.com) > for the patch!
	- Applied documentation patch from RT.
	- Fixed documentation to work with '<' redirect

0.79 Wed Jan 19 15:39:00 PST 2005
	- New maintainer: Richard Soderberg <>
	- Resolved several RT tickets
	  (4934, 8263, 8060, 8400, 8624, 5870, 4658, 8940, 1474, 4311)
	- Skip certain tests on AIX and OpenBSD as they deadlock otherwise
	- Applied AIX patch from ActiveState (#8263)
	- Fixed t/run.t on OS X (#8940)
	- Add check for EINTR to _read (#5870)
	- FreeBSD uses fds up to 4 by default, fixed tests to start at 5 (#8060)

0.78 Tue Mar  9 01:49:25 EST 2004
	- Removed all pseudohashes
	- Require Win32::Process when on Win32 (<CORION a t cpan . org>)
	- Retry the select() instead of croaking when EINTR occurs
	  (Ilya Martynov,  ilya a t
	- This needs further testing and analysis, but works for
	  the submitter.

0.77 Fri Sep 26 15:36:56 EDT 2003
	- Non-binmoded pipes are now s/\r//g on Win32
	- Passes all tests on WinXPPro and WinNT
	- Deadlocks somewhere shortly after process creation on Win2K
	  in some cases

0.76 (missing)
	- Does not use pseudohashes for perls >= 5.9.0 (reported by several
	  users, patch by Nicholas Clark <>)
	- pumpable() is now exported (reported by
	- pumpable() now more thorough in checking for a dead child (reported
	- it checks for reapable processes when all pipes to the process
	  are paused
	- pumpable() now yields the processor when all pipes to
	- Distro layout improved: and Run/... are now under

0.75 Tue Jan 28 11:33:40 EST 2003
	- Fix a bug that was causing _pipe() to seem to fail when feeding

0.74 Thu May 23 09:24:57 EDT 2002
	- Skip a set of pty tests that deadlock on freebsd.  Reported and
	  investigated by Rocco Caputo <>.  perldoc t/pty.t
	  for details.

0.73 Wed May 22 09:03:26 EDT 2002
	- Improved Win32 PATH and PATHEXT search;
	  original patch by Ron Savage <>

0.72 Thu May  9 10:25:55 EDT 2002
	- Doc patch from
	- Backport Win32Helper to 5.00503 (compilation of this is
	  tested on Unix or it would not have been spotted,
	  not even by Matt Sergeant

0.71 Mon May  6 09:04:18 EDT 2002
	- Fix the pesky run/t check for specific error string (test 134 at
	  the moment, bad file descriptor test) that keeps tripping up

0.70 Fri Apr 26 10:15:13 EDT 2002
	- Massive performance improvements on Win32 See IPC::Run::Win32Helper's
	  optimize() documentation.
	- moved data pump routine to IPC::Run::Win32Pump, now it loads much
	- Where reasonably safe to do so, temporary files are used instead of
	- Setting $ENV{IPCRUNDEBUG}="notopt" can help find opportunities for
	  optimizing.  See IPC::Run::Debug for details.
	- Added 'noinherit => 1' option (parsed like 'debug => "basic") to
	  allow stdin, stdout, and stderr to not be inherited by the child.
	- Factored debugging out in to IPC::Run::Debug so need not load
	  IPC::Run to get it.
	- Debugging code can be compile-time optimized away by setting
	  $ENV{IPCRUNDEBUG} = "none" (or 0) before IPC::Run::Debug is first loaded
	  causes all _debug... code to be optimized away before runtime.
	- Moved some functionality from IPC::Run in to IPC::Run::IO to allow
	  IPC::Run::Win32IO to alter IPC::Run's behavior.  More of this should
	  happen; IPC::Run has grown too bloaty.
	- All the hokey hacky "manual imports" of IPC::Run's old _debug...()
	  functions has been replaced by "use IPC::Run::Debug".
	- All the hokey hacky "manual imports" of IPC::Run's Win32_MODE()
	  constant has been replaced by importing it from IPC::Run.
	- Cleaned up IPC::Run::Win32*'s debugging levels a bit to unclutter
	  "basic" and "data" debugging level output.
	- exception handling in _open_pipes no longer silently eats exceptions.

0.67 Fri Apr 19 12:14:02 EDT 2002
	- remove _q from the examples in the POD - it was inconsistent (the
	  examples had bugs) and didn't help readability.  Spotted by

0.66 Wed Mar 27 07:42:27 EST 2002
	- Really dumb down that bad file descriptor test last tweaked in 0.64;
	  the CLI does not script well under internationalization.

0.65 (unreleased)
	- Mostly focused on Win32
	- pass filehandles to pumpers by number on the command line to avoid
	- use 2 arg binmode to force socket handles into/out of binmode
	- improve t/binmode.t
	- TODO: test ^Z and \000 pass-through.

0.64 Wed Mar 13 11:04:23 EST 2002
	- Fix a test that fails on AIX because it uses a different message for
	  "Bad file descriptor".  Reported by "Dave Gomboc" <>
	- If IO::Pty is loadable, require IO::Pty 1.00 or later.

0.63 Wed Feb 27 12:25:22 EST 2002
	- the select loop will now poll (with logarithmic fallback) when all
	  I/O is closed but we have children running.  Problem report by
	  "William R. Pearson" <>.

0.62 Tue Jan  1 16:40:54 EST 2002
	- Have all children close all file descriptors opened by the parent
	  harness, otherwise children of different harnesses can unwittingly
	  keep open fds the parent closes, thus preventing other children
	  from seeing them close.  Reported by Blair Zajac <>.

0.61 Fri Dec  7 05:21:28 EST 2001
	- Fix up signal.t to not fail due to printing not working quite right in
	  signal handlers.  Spotted in the wild by Blair Zajac <>.

0.6 Thu Dec  6 04:36:57 EST 2001
	- Get binmode--(">", binary) and ("<", binary)--working on Win32.

0.56 Sun Dec  2 09:18:19 EST 2001
	- IPC::Run now throws exceptions from the post-fork, pre-exec child process
	  back to the parent process using an additional pipe.  This pipe also
	  is used to pause the parent until the child performs the exec(), so
	  that (when a new version of IO::Pty implements it) pty creation can
	  be completed before the parent tries to write to it.

0.55 Sat Dec  1 17:15:02 EST 2001
	- Fixups to Win32 code to get it compiling ok (added t/win32_compile.t
	  to ensure that at least compiles Ok).
	- Minor tweak to deal with "_" in $IO::Pty::VERSION, which is "0.92_04",
	  including quotes, in the current version.

0.54 Fri Nov 30 11:46:05 EST 2001
	- Win32 SUPPORT!!!!!
	- Added support for env. var. IPCRUNDEBUG=1 (or 2, 3, 4) to make it
	  easier for users to debug the test suite.
	- Adapt to IO::Pty 0.91, which creates slave fds in new(), forcing us to
	  close them in the parent after the fork().  We don't check for IO::Pty's
	  version number, perhaps we should (waiting for a response from Roland
	  Giersig <> about what he intends, since this could affect
	  all users of older IO::Ptys that upgrade).
	- Add a sleep(1) to allow the slave pty to be initted, otherwise a premature
	  write() to the slave's input can be lost.  This is a bogus hack, but
	  IO::Pty 0.9x should fix it when it's released.
	- removed spurious use Errno qw( EAGAIN ), since this causes warnings with
	  perl5.00505.  Reported by  Christian Jaeger <>
	- IPC::Run::start() now does a kill_kill() if called on an already started
	  harness.  This is needed on Win32 to pass the test suite, but it's also a
	  nice thing.
	- The debug file descriptor is built by dup()ing STDERR in the parent and
	  passing it to the kids.  This keeps us from needing to worry about
	  debugging info in the select() loop and removes unnecessary complications.
	  Still needs a bit of work: it should be dup()ed in _open_pipes and it's
	  value should be stored in the harness, not a global.
	- child processes are now a little more clearly identified in debug output.
	- Some debugging messages are now clearer.
	- debugging is now almost ready to be compile-time optimized away.
	- "time since script start" is now shown when debugging.  We should check to
	  see if Time::HiRes is loaded and make this more accurate.
	- pipe opens are now down in Run::IO::open_pipe().
	- map_fds won't complain about no open fds unnecessarily (which was rare,
	  but still).
	- the debug fd is now determined per-harness, not globally.  This requires a
	  bit of a hack (since I don't want to require $harness->_debug everywhere
	  _debug might be called), but it seems worthwhile.

0.5 Sat Nov 10 21:32:58 EST 2001
	- confess() when undef passed to _exec()
	- Cleaned up some POD and code comments.
	- Added patch to make the write side of pipes & ptys that IPC::Run must
	  write to be non-blocking. Added a test for pipes, but Boris reports that
	  Solaris 8 something seems to still block in the pty case, though Linux
	  does not, so I did not add a test for that case.  Probably should add one
	  and complain bitterly if it fails (rather than actually failing the tests)
	  and ptys are used.  Patch from Borislav Deianov
	- Added a patch to invalidate the search path cache if the file is no longer
	  executable, also from Borislav Deianov <>
	- Started implementation of an adopt() external call that would let you
	  aggregate harnesses, and a t/adopt.t, but different children need to
	  properly close all FDs: they're inheriting each other's FDs and not
	  properly closing them.
	- Close $debug_fd in &sub coprocesses.
	- Document the problems with &sub coprocesses.
	- Fixed fork error return detection to actually work, spotted by Dave
	  Mitchell <>.
	- Give errors if a path with a directory separator is passed in if the
	  indicated filename does not exist, is not a file, or is not executable.
	  They're unixish errors, but hey...
	- Allowed harness \@cmd, '>', $foo, timeout 10 ; to parse (it was mistakenly
	  thinking I wanted to send output to the IPC::Run::Timer created by
	- pumpable() now returns true if there are any kids left alive, so that
	  timers may continue to run.
	- A timeout of 1 second is forced if there are no I/O pipes left open, so
	  that the select loop won't hang in select() if there is no I/O to do.
	  Perhaps should only do that if there are timers.
	- Added a signal() to send specified signals to processes.  Chose this over
	  the more traditional Unix kill() to avoid people thinking that kill()
	  should kill off processes.
	- Added kill_kill() which does kill off processes and clean up the harness.
	  Sends TERM then (if need be) waits and sends KILL.
	- timeouts now work.
	- Removed eval{}s from a few subs, we were being over protective.
	- Preserve pos() across updates to scalars we append to, so m//g
	  matches will work.
	- Cleaned up the examples/
	- Added abuse/ for (mostly user contributed) scripts that I can use as
	  a manual regression test.  Most/all are reflected in t/*.t, but not
	  verbatim, so it's good to have to originals around in case they
	  happen to trigger something t/*.t miss.
	- Cleaned up SYNOPSIS a bit: it was too scary.  Still is, but less so.

0.44 Mon Oct  2 17:20:29 EDT 2000
	- Commented out all code dealing with select()'s exception file descriptor
	  mask.  Exceptions are vaguely defined and until somebody asks for them
	  I don't want to do anything automatic with them.  Croaking on them
	  was certainly a bad idea: FreeBSD and some other platforms raise an
	  exception when a pipe is closed, even if there's data in the pipe.
	  IPC::Run closes a pipe filehandle if it sees sysread() return an
	  error or 0 bytes read.

0.43 Thu Aug 17 23:26:34 EDT 2000
	- Added flushing of STDOUT and STDERR before fork()/spawn() so that the
	  children won't inherit bufferloads of unflushed output.  This seems
	  to be automatic in 5.6.0, but can cause loads of grief in 5.00503.
	  I wish there were a way to flush all open filehandles, like stdio's
	  fflush( NULL ) ;

0.42 Thu Aug 17 23:26:34 EDT 2000
	- Worked around pseudo-hash features not implemented in perl5.00503
	- Deprecated passing hashes of options in favor of just passing
	  name-value pairs.

0.41 (missing)
	- Added result, results, full_result, full_results.  I added so many
	  variations because I expect that result and full_result are the most
	  likely to get a lot of use, but I wanted to be able to return a list
	  as well, without misusing wantarray.

0.4  Thu Jun 15 14:59:22 EDT 2000
	- Added IPC::Run::IO and IPC::Run::Timer, bunches of tests.  IPC::Run
	  can now do more than just run child processes.
	- Scribbled more documentation.  Needs a good edit.
	- Fixed some minor bugs here and there.

0.34 Thu Jun  8 06:39:23 EDT 2000
	- Fixed bug in t/pty.t that prevented it from noticing IO::Pty
	- Converted IPC::Run to use fields.

0.32 Thu Jun  8 06:15:17 EDT 2000
	- Added warning about missing IO::Pty in MakeMaker.PL.  Thought about
	  making it a prerequisite, but it's not: IPC::Run can do pipes, etc,
	  if it's not found, and IO::Pty is more unix-specific than IPC::Run is.
	  What I'd really like is an 'ENABLERS' section to MakeMaker.PL that
	  tells to try to install it but not to stress if it can't.
	- t/pty.t skips all tests if require IO::Pty fails.

0.31 Tue Jun  6 01:54:59 EDT 2000
	- t/pty.t should now report what was received when checking it against
	  a regex.  This is because 0.3's failing a few tests on ppc-linux
	  and the ok( $out =~ /.../ ) ; wasn't giving me enough info.  I chose
	  the 1 arg form due to older perl dists' not grokking
	  ok( $out, qr// ) ;.  I should really do this to t/*.t, but I'm tired.
	- Removed the misfired Run/ from the dist.

0.3  Sat Jun  3 08:33:17 EDT 2000
	- Changed spelling of '<|<' and '>|>' to '<pipe' and '>pipe'.  This
	  is to make it less confusing (I hope), since '>|' is a valid construct
	  in some shells with totally unrelated semantics, and I plan on adding
	  it to IPC::Run if a noclobber option ever makes it in.
	- Added '<pty<' and '>pty>' operators.

0.21 Fri Jun  2 12:49:08 EDT 2000
	- Added some advice for dealing with obstinate children
	- Converted many methods to plain subs for simplicity & performance
	- Converted to using local $debug to control debugging status for
	  simplicity's sake.  Don't know about performance effects, since
	  dynamic scope lookups can be slow.

0.2  Thu Jun  1 01:48:29 EDT 2000
	- Undid the creation of a pipe when passing a \*FOO or an IO::Handle
	  ref and added '<|<', \*IN and '>|>', \*OUT syntax instead.  This was
	  because some very subtle bugs might have occurred if \*FOO was left
	  in the wrong opened/closed state before calling run(), start() or
	  harness().  Now, \*FOO must be open before the start() call, and
	  '<|<' and '>|>' will close \*IN or \*OUT (or whatever) and open
	  a pipe on it.  This is analogous to IPC/Open{2,3}.pm behaviors.
	- Added eg/factorial_scalar and eg/runsh.  Rewrote eg/factorial_pipe.
	- Fixed bug that was preventing input scalar refs (ie input for the
	  child process) from ever being read from a second time.  This
	  caused pump() to hang.
	- Cleaned up calculation and use of timeout values so that when
	  select() times out, it isn't called again.  It's now adding one
	  second to the timeout value because time() resolution is 1 second
	  and we want to guarantee a minimum timeout even when we sample the
	  start time at the end of a second
	- minor name changes to some field names to make the code marginally
	  less obscure.
	- Fixed the MakeMaker settings and the directory layout so "make install"
	  actually works.

0.1  Tue Apr 25 22:10:07 2000
	- Initial release