Overview
Comment: | Make it possible to close an OFProcess for writing. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
88a34646a46c42b9f7bae7ba4bed63ce |
User & Date: | js on 2011-10-11 22:30:37 |
Other Links: | manifest | tags |
Context
2011-10-11
| ||
22:35 | OFProcess: Make programName and arguments optional init arguments. check-in: d605361c8b user: js tags: trunk | |
22:30 | Make it possible to close an OFProcess for writing. check-in: 88a34646a4 user: js tags: trunk | |
22:21 | More OFXMLParser optimizations. check-in: 8953d826b4 user: js tags: trunk | |
Changes
Modified src/OFProcess.h from [7fb49d4ac9] to [49a6b170dc].
︙ | ︙ | |||
54 55 56 57 58 59 60 61 | * Usually, this is equal to program. * \param arguments The arguments to pass to the program, or nil * \return An initialized OFProcess. */ - initWithProgram: (OFString*)program programName: (OFString*)programName arguments: (OFArray*)arguments; @end | > > > > > > > > > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | * Usually, this is equal to program. * \param arguments The arguments to pass to the program, or nil * \return An initialized OFProcess. */ - initWithProgram: (OFString*)program programName: (OFString*)programName arguments: (OFArray*)arguments; /** * \brief Closes the write direction of the process. * * This method needs to be called for some programs before data can be read, * since some programs don't start processing before the write direction is * closed. */ - (void)closeForWriting; @end |
Modified src/OFProcess.m from [eb421acf0f] to [7e13a65e14].
︙ | ︙ | |||
134 135 136 137 138 139 140 141 142 143 144 145 146 147 | } /* * FIXME: Add -[fileDescriptor]. The problem is that we have two FDs, which is * not yet supported by OFStreamObserver. This has to be split into one * FD for reading and one for writing. */ - (void)close { if (readPipe[0] != -1) close(readPipe[0]); if (writePipe[1] != -1) close(writePipe[1]); | > > > > > > > > | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | } /* * FIXME: Add -[fileDescriptor]. The problem is that we have two FDs, which is * not yet supported by OFStreamObserver. This has to be split into one * FD for reading and one for writing. */ - (void)closeForWriting { if (writePipe[1] != -1) close(writePipe[1]); writePipe[1] = -1; } - (void)close { if (readPipe[0] != -1) close(readPipe[0]); if (writePipe[1] != -1) close(writePipe[1]); |
︙ | ︙ |