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

svnserve - don't ignore errors

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 21 Nov 2013 19:18:11 +0000

Bert mentioned to me that svnserve sometimes exits successfully after a
genuine fatal error.

In r1544253 I added error checking to some socket initiliazation cases. I
haven't reproduced such errors, I just followed the obvious coding pattern
to add the missing checks.

I would appreciate a review of that to ensure it wasn't ignoring errors on
purpose in either of those places.

In r1544256 I added error checking to the main exit code path of both inetd
and tunnel modes. This one is easily demonstrated and pretty obvious I
think:

[[[
# previously:
$ echo foo | svnserve -t
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops
depth log-revprops atomic-revprops partial-replay inherited-props
ephemeral-txnprops file-revs-reverse ) ) )
julianfoad_at_julian-think ~/src/subversion-c
$ echo $?
0

$ echo foo | svnserve -t
# now:
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops
depth log-revprops atomic-revprops partial-replay inherited-props
ephemeral-txnprops file-revs-reverse ) ) )
/.../subversion/svnserve/serve.c:3622,
/.../subversion/libsvn_ra_svn/marshal.c:1372:
(apr_err=SVN_ERR_RA_SVN_MALFORMED_DATA)
svnserve: E210004: Malformed network data
$ echo $?
1
]]]

Review appreciated, again, though, as I don't know what strange
configurations people might possibly have where they're perhaps relying on
getting no error report. Hopefully not, but sometimes people do strange
things.

- Julian
Received on 2013-11-21 20:19:07 CET

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.