Differences From Artifact [bd118b08f1]:
- File src/platform/posix/OFProcess.m — part of check-in [5ca0376aa3] at 2020-02-29 16:09:46 on branch trunk — Move OFProcess to platform subdirectory (user: js, size: 8822) [annotate] [blame] [check-ins using] [more...]
To Artifact [9948874fbd]:
- File
src/platform/posix/OFProcess.m
— part of check-in
[67df0aa735]
at
2020-04-24 22:42:55
on branch trunk
— OFProcess: Initialize to invalid handles first
The reason for this is that if anything fails during init, close is
called on dealloc and we want it to be in a sane state for that. (user: js, size: 8873) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
127 128 129 130 131 132 133 134 135 136 137 138 139 140 | self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); const char *path; char **argv; if (pipe(_readPipe) != 0 || pipe(_writePipe) != 0) @throw [OFInitializationFailedException exceptionWithClass: self.class]; path = [program cStringWithEncoding: [OFLocale encoding]]; [self of_getArgv: &argv forProgramName: programName | > > > | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | self = [super init]; @try { void *pool = objc_autoreleasePoolPush(); const char *path; char **argv; _pid = -1; _readPipe[0] = _writePipe[1] = -1; if (pipe(_readPipe) != 0 || pipe(_writePipe) != 0) @throw [OFInitializationFailedException exceptionWithClass: self.class]; path = [program cStringWithEncoding: [OFLocale encoding]]; [self of_getArgv: &argv forProgramName: programName |
︙ | ︙ |