Artifact a96b274fb866d5ddb3457d180b605ed6eca226a44e1871cc2ee592ccdd7b16c6:
- File
src/OFProcess.h
— part of check-in
[02ab9aa8a9]
at
2011-10-05 23:26:08
on branch trunk
— Add OFProcess.
Win32 implementation following later. (user: js, size: 1413) [annotate] [blame] [check-ins using]
#import "OFStream.h" /** * \brief A class for stream-like communication with a newly created process. */ @interface OFProcess: OFStream { int readPipe[2], writePipe[2]; BOOL atEndOfStream; } /** * \brief Creates a new OFProcess with the specified program, program name and * arguments and invokes the program. * * \param program The program to execute. If it does not start with a slash, the * search path specified in PATH is used. * \param programName The program name for the program to invoke (argv[0]). * Usually, this is equal to program. * \param arguments The arguments to pass to the program, or nil * \return A new, autoreleased OFProcess. */ + processWithProgram: (OFString*)program programName: (OFString*)programName arguments: (OFArray*)arguments; /** * \brief Initializes an already allocated OFProcess with the specified * program, program name and arguments and invokes the program. * * \param program The program to execute. If it does not start with a slash, the * search path specified in PATH is used. * \param programName The program name for the program to invoke (argv[0]). * 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