"In het verleden behaalde resultaten bieden geen garanties voor de toekomst"
About this blog

These are the ramblings of Matthijs Kooijman, concerning the software he hacks on, hobbies he has and occasionally his personal life.

Most content on this site is licensed under the WTFPL, version 2 (details).

Questions? Praise? Blame? Feel free to contact me.

My old blog (pre-2006) is also still available.

Sun Mon Tue Wed Thu Fri Sat
27 28
29 30 31        
Powered by Blosxom &Perl onion
(With plugins: config, extensionless, hide, tagging, Markdown, macros, breadcrumbs, calendar, directorybrowse, entries_index, feedback, flavourdir, include, interpolate_fancy, listplugins, menu, pagetype, preview, seemore, storynum, storytitle, writeback_recent, moreentries)
Valid XHTML 1.0 Strict & CSS
Defunct subversion post-commit hook

I'm using subversion to manage code for Brevidius, the company I work for. In the code, I use doxygen to document the code. Because I do not care to regenerate the documentation after every change I make, I use subversion's post-commit hook to regenerate the documentation on every commit.

Because the generation of documentation takes long, I added a & to the call to doxygen-post-commit-hook in my post-commit file. This was supposed to put the doxygen generation in the background, so my svn client wouldn't take so long for every commit. This didn't work at all.

The command was properly backgrounded (any commands I put after the call to doxygen-post-commit-hook were executed quickly), but ps aux --forest showed that although doxygen-post-commit-hook was indeed no longer a child process of post-commit, post-commit was now a defunct process.

It turns out that just backgrounding the command is not enough, one should also redirect inputs and outputs (perhaps not all three, but that works at least). So, calling doxygen-post-commit-hook is now:

/home/data/svn-hook-scripts/doxygen-post-commit-hook "$REPOS" "$REV"
    "classbased cms/Doxyfile" "/var/www/doxygen/Brevidius" < /dev/null >
    /dev/null 2> /dev/null &

This issue is also referenced in an subversion mailing list, though not directly.

For those who are interested, here is the doxygen-post-commit-hook too.


# Arguments are REPOS, REV, DOXYFILE, OUTPUT_DIR, in that order. DOXYFILE is
# the path inside the repository (no leading /).



svn export file://$REPOS -r $REV $TMPDIR

cd "`dirname "$TMPDIR/$DOXYFILE"`"

echo -e \
| cat `basename "$DOXYFILE"` - | doxygen -

rm -r $TMPDIR

0 comments -:- permalink -:- 19:36
Copyright by Matthijs Kooijman - most content WTFPL