Problem calling rsync from java on OSX
Drew Lippolt
lists-rsync at azera.net
Fri Nov 19 18:05:25 GMT 2004
wayne,
thanks for the helpful response.
the redirection stuff doesn't work too well when called from java. see
this page:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
a quick scan of the 2.6.3 sourcecode showed that i could just have
is_a_socket return false (0) in all cases. only downsides i could
determine were inability to run from inet and avoiding some cleanup
code--which avoids sending a tcp RST--beneficial to winblows when rsync
gets killed.
with this modification, rsync seesm to work fine in my application.
does anyone see a problem with this modification, assuming the resultant
binary would never be run in any mode except daemon mode?
thanks,
<drew>
Wayne Davison wrote:
>On Thu, Nov 18, 2004 at 11:52:30PM -0600, Drew Lippolt wrote:
>
>
>>can i force daemon mode, even if the rsync process thinks it should be
>>running out of inet?
>>
>>
>
>You might try adding "</dev/tty", "</dev/null", or something like that.
>Rsync is calling getsockopt() on the STDIN file descriptor to ask for
>the socket type, and you need to make sure that the processes's STDIN is
>something that will cause that function to return an error. If changing
>the stdin doesn't work, you'll need to figure out why getsockopt() is
>misbehaving -- perhaps it is returning success but the values returned
>are different from what a real socket would return, so the is_a_socket()
>code could be modified to work with the incompatible getsockopt().
>
>..wayne..
>
>
More information about the rsync
mailing list