On Sat, 26 Aug 2023 14:08:34 +0000 "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" wrote: > IMO you're triggering an undefined (or not well-defined) behavior, because of > the murky status > of the byte count of 0. It may work now, but it may not work in the future... > > RETURN VALUE > On success, the number of bytes written is returned (zero indicates > nothing was written). On error, -1 is returned, and > errno is set appropriately. > > If count is zero and fd refers to a regular file, then write() may > return a failure status if one of the errors below is > detected. If no errors are detected, 0 will be returned without > causing any other effect. If count is zero and fd refers > to a file other than a regular file, the results are not specified.
You seems to reffer Linux man, however, this patch calls ssize_t fhandler_socket_wsock::write (const void *in_ptr, size_t len) of cygwin, NOT Linux write(). -- Takashi Yano <takashi.y...@nifty.ne.jp> -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple