ext/common/Utils/IOUtils.h in passenger-3.0.11 vs ext/common/Utils/IOUtils.h in passenger-3.0.12

- old
+ new

@@ -412,15 +412,21 @@ */ void writeFileDescriptor(int fd, int fdToSend, unsigned long long *timeout = NULL); /** * Closes the given file descriptor and throws an exception if anything goes wrong. - * This function also works around certain close() bugs on certain operating systems. + * This function also works around certain close() bugs and quirks on certain + * operating systems, such as the FreeBSD ENOTCONN-on-close bug and the fact that + * when close() returns EINTR the state of the file descriptor is unspecified. + * See IOUtils.cpp and ext/oxt/system_calls.cpp for details. * * @throws SystemException * @throws boost::thread_interrupted */ -void safelyClose(int fd); +#ifndef _PASSENGER_SAFELY_CLOSE_DEFINED_ + #define _PASSENGER_SAFELY_CLOSE_DEFINED_ + void safelyClose(int fd, bool ignoreErrors = false); +#endif } // namespace Passenger #endif /* _PASSENGER_IO_UTILS_H_ */