You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Timothee Besset <tt...@idsoftware.com> on 2003/04/03 14:17:55 UTC

ra_svn + ssh svn commit hangs for a while after printing "Committed revision xxx."

I've noticed that svn doesn't exit right away after it prints "Committed
revision xxx." Sometimes it can stay there for up to a minute before it
actually exits.

I found out that while the svn client is waiting, I have hot-backup.py and
svnlook still running. But those are spawned in the background from
post-commit, and post-commit exited already.

It looks like it would be related to ssh waiting for closure of stdout on
the server's end before it actually exits. Which kills the benefit of
backgrounding the post-commit operations. Maybe svnserve should forcibly
close it's stdout when it exits, or something similar?

TTimo

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

Re: ra_svn + ssh svn commit hangs for a while after printing "Committed revision xxx."

Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2003-04-03 at 09:17, Timothee Besset wrote:
> It looks like it would be related to ssh waiting for closure of stdout on
> the server's end before it actually exits. Which kills the benefit of
> backgrounding the post-commit operations. Maybe svnserve should forcibly
> close it's stdout when it exits, or something similar?

Well, you can't forcibly close a file descriptor; the child process
already has a handle on it, and you can't take it away.

We could set stdin and stdout close-on-exec at startup time.  That poses
two problems: it's not very portable, and it would run the risk that
child processes would open files and have them become stdin and stdout. 
(A variant that would solve the second problem is to dup stdin and
stdout and then redirect the originals to /dev/null.  Even less portable
to Windows.)  This would also solve the "ra_svn over ssh can have its
data stream corrupted by hook scripts" issue.

We could make the post-commit close its stdin and stdout and stderr,
which wouldn't be a terrible idea for something running in the
background.  Obviously, that doesn't solve the hook script problem.


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