Changeset 864
- Timestamp:
- 01/28/08 21:45:54
- Files:
-
- trunk/src/vpb/FileUtils.cpp (modified) (3 diffs)
- trunk/src/vpb/MachinePool.cpp (modified) (1 diff)
- trunk/src/vpb/PropertyFile.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vpb/FileUtils.cpp
r861 r864 5 5 #ifdef WIN32 6 6 7 #define WIN32_LEAN_AND_MEAN 1 7 8 #include <windows.h> 8 9 #include <stdarg.h> … … 12 13 #include <direct.h> 13 14 #include <fcntl.h> 15 #include <winsock.h> 14 16 #include <sys/types.h> 15 17 … … 29 31 int vpb::lockf(int fildes, int function, off_t size) { return 0; } 30 32 int vpb::ftruncate(int fildes, off_t length) { return ::_chsize(fildes, length); } 31 32 // No equivalent to sync() on Win32, could use fsync(fd) on each file. 33 void vpb::sync() { (void) _flushall(); } 33 void vpb::sync() { (void) ::_flushall(); } 34 34 int vpb::fsync(int fd) { if (fd) return ::_commit(fd); return 0; } 35 35 int vpb::getpid() { return ::_getpid(); } trunk/src/vpb/MachinePool.cpp
r829 r864 159 159 int Machine::exec(const std::string& application) 160 160 { 161 bool runningRemotely = getHostName()!=getLocalHostName() ;161 bool runningRemotely = getHostName()!=getLocalHostName() && getHostName()!="localhost"; 162 162 163 163 std::string executionString; trunk/src/vpb/PropertyFile.cpp
r831 r864 41 41 _requiresSync = true; 42 42 43 FILE* file = vpb::fopen(filename.c_str(), "w r");43 FILE* file = vpb::fopen(filename.c_str(), "w+"); 44 44 45 45 vpb::fclose(file);
