[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH]: svn_io_start_cmd2 which can create pipes

From: Martin Furter <mf_at_rola.ch>
Date: 2007-03-26 06:24:07 CEST

Hello

While writing svntar (http://svn.borg.ch/tmp/svntar/0.0.2/) I needed a
function similar to svn_io_start_cmd but I needed stdin to be a pipe.

After reading APR docs and playing around I found apr_procattr_io_set.
First I copied svn_io_start_cmd and modified it to do what I want, and it
works fine. So I thought let's write a patch...

Then I found out that the only caller of svn_io_start_cmd does the same
thing but in a different way. It is run_hook_cmd in libsvn_repos/hooks.c .

Is there a reason it does it different?
If not a large part of the code in there can be removed when using
svn_io_start_cmd2.

  - Martin

[[[
Add svn_io_start_cmd2 which can create pipes if needed.

* subversion/libsvn_subr/io.c
   (svn_io_start_cmd2): Renamed from svn_io_start_cmd and added pipe_flags.
   (svn_io_start_cmd): Calls svn_io_start_cmd2 with pipe_flags=0.

* subversion/include/svn_io.h
   (SVN_IO_PIPE_STDIN,SVN_IO_PIPE_STDOUT,SVN_IO_PIPE_STDERR): New defines.
   (svn_io_start_cmd2): New function.
   (svn_io_start_cmd): Added @deprecated comment.

* subversion/include/svn_error_codes.h
   (SVN_ERR_IO_FILE_AND_PIPE_ERROR): New error code.
]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Mon Mar 26 06:24:31 2007

This is an archived mail posted to the Subversion Dev mailing list.