On Saturday 17 March 2007 07:30, Jan Hendrik wrote:
> > #!/bin/sh
> > REPOS="$1"
> > REV="$2"
> > /path/to/some-other-script.sh "$REPOS" "$REV" >/dev/null
> > 2>/dev/null &
> >
> >
> > ....then some-other-script.sh has been forked off into its own
> > process, and post-commit ends immediately, before some-other-
> > script.sh is done running, which can cause the possible problems
> > as mentioned above.
>
> I am not very versed with pipes, but if the output/result/whatever
> of a script/program is directed elsewhere (>/dev/null ...) then
> this is a fork-off or new thread and the calling script would not
> wait for stuff? Logical enough. What you wrote also reminds me of
> a couple of scripts I use here for some operations on both local
> and remote stuff. The local script calls a complementary script on
> the remote system (telnet/ssh) and then waits for the remote script
> to finish, and if the connection to the remote system breaks
> occasionally I have to kill the local script process. Guess I
> understand this business better now. Thanks, Ryan.
>
> JH
Basically, what matters is whether they are running in parallel, so
that post-commit hook likely finishes before some-other-script. So if
you're not sure how that works in your system, you could try running
some-other-script with a long delay and see if the script calling it
finishes quickly or also waits a long time.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Mar 24 00:55:15 2007