Ticket #242 (closed defect: fixed)
replicate1 fails on windows
| Reported by: | charlie | Owned by: | newbugs |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Backend-Remote | Version: | 1.0.5 |
| Severity: | normal | Keywords: | |
| Cc: | Blocked By: | ||
| Operating System: | Microsoft Windows | Blocking: |
Description
In remoteconnection.cc we currently use a pair of file descriptors, which may refer to a socket, stdin/stdout or a file. However we also need in the Windows case to use ReadFile/WriteFile? which require a HANDLE. We use _get_osfhandle to attempt to translate a file descriptor into a HANDLE, however this is not recommended by Microsoft and may cause problems (we have already found that file pointers for files - not sockets or stdin/stdout - are not advanced automatically, meaning we have to manually use an OVERLAPPED structure to keep file pointers correct). Perhaps remoteconnection.cc should open/close files internally, so we could use Windows HANDLES when we need them, or fd's when we don't. Ref: http://support.microsoft.com/kb/99173
