]> git.tuebingen.mpg.de Git - dss.git/commit
open /dev/null for reading AND writing when executing rsync.
authorSebastian Stark <stark@kamp.kyb.local>
Wed, 22 Oct 2008 12:59:11 +0000 (14:59 +0200)
committerSebastian Stark <stark@kamp.kyb.local>
Wed, 22 Oct 2008 13:19:45 +0000 (15:19 +0200)
commitf9af4b1114a1a9b3b88a7d89985220ff586b5ef1
tree1d2ba961161036ef33fbbc10a7b5ff76ed6cf7ef
parentcfdc28028a7a55a1f9e14ff3d2e34273ef32e6a6
open /dev/null for reading AND writing when executing rsync.

This is needed for child processes to be able to write to fd 2 without failing.

For example, rsync will not be able to write an error message because of "Bad
file descriptor" which in turn leads to rsync exiting with meaningless exit
code 13 ("Errors with program diagnostics"), masking the actual error and exit
code.

The fact that rsync uses exit code 13 in that case makes this bug particularly
painful since 13 is interpreted by dss as a temporary rsync error that can be
"fixed" by simply restarting rsync. This can lead to an infinite loop,
obviously.
exec.c