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

[PATCH] #9 OS400/EBCDIC Port: Running Hook Scripts

From: Paul Burba <paulb_at_softlanding.com>
Date: 2006-02-27 21:26:12 CET

Hello All,

In the home stretch now, this is the second to last of the core
OS400/EBCDIC patches.

(Don't know what the OS400/EBCDIC port is about? See:
http://svn.haxx.se/dev/archive-2006-02/0519.shtml)

When running hook scripts, svn_io_wait_for_cmd() calls:

  APR_DECLARE(apr_status_t)
  apr_proc_wait(apr_proc_t *proc,
                int *exitcode,
                apr_exit_why_e *exitwhy,
                apr_wait_how_e waithow)

This function works on OS400 to the extent that the hook script is run,
but there are some problems, the most significant being that exitcode is
always set to 0, regardless of what the script returns. This is obviously
problematic when we care if the script failed or not (e.g. pre-commit
hook).

This patch adds a new OS400 specific function to svn_io.h that uses
spawn() and waitpid() to run scripts and obtain the script's exit code.

Please take a look and let me know what you think, thanks,

Paul B.

[[[
OS400/EBCDIC Port:

This is one of several patches to allow Subversion to run on IBM's
OS400 V5R4. It provides a workaround of a limitation with
apr_proc_wait() which always indicates a process exited
successfully, regardless of whether it did or not.

* subversion\include\svn_io.h
   (svn_io_run_os400_cmd): New function declaration.

* subversion\libsvn_repos\hooks.c
   (run_hook_cmd): Use new function in place of svn_io_start_cmd()
    and svn_io_wait_for_cmd().

* subversion\libsvn_subr\io.c
   (SVN_UTF_ETOU_XLATE_HANDLE): New xlate key for EBCDIC to UTF-8
    conversions.
   (svn_io_run_os400_cmd): New function definition.
]]]

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

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

Received on Mon Feb 27 22:05:19 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.