ObjFW  Diff

Differences From Artifact [31e05575b5]:

  • File src/OFSelectKernelEventObserver.m — part of check-in [a6a4cc9010] at 2025-06-03 00:20:43 on branch trunk — Correctly handle EINTR with WaitSelect() (user: js size: 7123)

To Artifact [88a29e4715]:

  • File src/OFSelectKernelEventObserver.m — part of check-in [0be0be863d] at 2025-06-03 01:06:42 on branch trunk — Fix accidental ) (user: js size: 7122) [more...]

250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
	while ((events = select(_maxFD + 1, &readFDs, &writeFDs, NULL,
	    (timeInterval != -1 ? &timeout : NULL))) < 0) {
		int errNo = _OFSocketErrNo();

		if (errNo != EINTR)
			@throw [OFObserveKernelEventsFailedException
			    exceptionWithObserver: self
					    errNo: errNo)];
	}

	if (FD_ISSET(_cancelFD[0], &readFDs)) {
		char buffer;

# ifdef OF_HAVE_PIPE
		OFEnsure(read(_cancelFD[0], &buffer, 1) == 1);







|







250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
	while ((events = select(_maxFD + 1, &readFDs, &writeFDs, NULL,
	    (timeInterval != -1 ? &timeout : NULL))) < 0) {
		int errNo = _OFSocketErrNo();

		if (errNo != EINTR)
			@throw [OFObserveKernelEventsFailedException
			    exceptionWithObserver: self
					    errNo: errNo];
	}

	if (FD_ISSET(_cancelFD[0], &readFDs)) {
		char buffer;

# ifdef OF_HAVE_PIPE
		OFEnsure(read(_cancelFD[0], &buffer, 1) == 1);