ObjFW  Check-in [ed598fd848]

Overview
Comment:-[OFKernelEventObserver cancel]: Handle EINTR
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ed598fd8487309d3f3cd1a4338a1462460bc838c7004b3c584b37357740ce6b1
User & Date: js on 2024-07-29 19:41:09
Other Links: manifest | tags
Context
2024-07-29
22:19
Fix missing underscore in last commit check-in: c9bf16250c user: js tags: trunk
19:41
-[OFKernelEventObserver cancel]: Handle EINTR check-in: 4bb1e7096e user: js tags: 1.1
19:41
-[OFKernelEventObserver cancel]: Handle EINTR check-in: ed598fd848 user: js tags: trunk
2024-07-28
19:56
Add support for Codepage 852 check-in: 0c7de8be1d user: js tags: trunk
Changes

Modified src/OFKernelEventObserver.m from [0c63190dd8] to [9e9d5309f1].

262
263
264
265
266
267
268

269




270

271
272




273

274
275




276
277
278
	if (_waitingTask != NULL) {
		Signal(_waitingTask, (1ul << _cancelSignal));
		_waitingTask = NULL;
	}

	Permit();
#elif defined(OF_HAVE_PIPE)

	OFEnsure(write(_cancelFD[1], "", 1) > 0);




#elif defined(OF_WII)

	OFEnsure(sendto(_cancelFD[1], "", 1, 0,
	    (struct sockaddr *)&_cancelAddr, 8) > 0);




#else

	OFEnsure(sendto(_cancelFD[1], (void *)"", 1, 0,
	    (struct sockaddr *)&_cancelAddr, sizeof(_cancelAddr)) > 0);




#endif
}
@end







>
|
>
>
>
>

>
|
|
>
>
>
>

>
|
|
>
>
>
>



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
	if (_waitingTask != NULL) {
		Signal(_waitingTask, (1ul << _cancelSignal));
		_waitingTask = NULL;
	}

	Permit();
#elif defined(OF_HAVE_PIPE)
	do {
		if (write(_cancelFD[1], "", 1) == 1)
			break;

		OFEnsure(errno == EINTR);
	} while (true);
#elif defined(OF_WII)
	do {
		if (sendto(_cancelFD[1], "", 1, 0,
		    (struct sockaddr *)&_cancelAddr, 8) == 1)
			break;

		OFEnsure(OFSocketErrNo() == EINTR);
	} while (true);
#else
	do {
		if (sendto(_cancelFD[1], (void *)"", 1, 0,
		    (struct sockaddr *)&_cancelAddr, sizeof(_cancelAddr)) == 1)
			break;

		OFEnsure(OFSocketErrNo() == EINTR);
	} while (true);
#endif
}
@end