Differences From Artifact [dc696d6c83]:
- File
src/OFProcess.m
— part of check-in
[3ff339cf42]
at
2015-08-26 08:24:17
on branch trunk
— OFProcess: Send SIGTERM on close
SIGKILL was a little bit too much. (user: js, size: 14204) [annotate] [blame] [check-ins using] [more...]
To Artifact [09488f3c9c]:
- File src/OFProcess.m — part of check-in [fc73801932] at 2015-10-04 11:30:52 on branch trunk — Better length checks for write / send calls (user: js, size: 14292) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
494 495 496 497 498 499 500 | length: (size_t)length { #ifndef _WIN32 if (_writePipe[1] == -1 || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; | > > > | | | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 | length: (size_t)length { #ifndef _WIN32 if (_writePipe[1] == -1 || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; if (length > SSIZE_MAX) @throw [OFOutOfRangeException exception]; if (write(_writePipe[1], buffer, length) != (ssize_t)length) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length errNo: errno]; #else DWORD ret; if (length > UINT32_MAX) @throw [OFOutOfRangeException exception]; if (_writePipe[1] == NULL || _atEndOfStream) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; if (!WriteFile(_writePipe[1], buffer, (DWORD)length, &ret, NULL) || ret != (DWORD)length) { int errNo = 0; if (GetLastError() == ERROR_BROKEN_PIPE) errNo = EPIPE; @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length |
︙ | ︙ |