37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
|
#import "OFInitializationFailedException.h"
#import "OFNotOpenException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"
#ifndef HAVE_POSIX_SPAWNP
#if !defined(HAVE_POSIX_SPAWNP) || !defined(HAVE_SPAWN_H)
extern char **environ;
#endif
@interface OFSubprocess ()
- (void)of_getArgv: (char ***)argv
forProgramName: (OFString *)programName
andArguments: (OFArray *)arguments;
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
-
+
|
path = [program cStringWithEncoding: [OFLocale encoding]];
[self of_getArgv: &argv
forProgramName: programName
andArguments: arguments];
@try {
env = [self of_environmentForDictionary: environment];
#ifdef HAVE_POSIX_SPAWNP
#if defined(HAVE_POSIX_SPAWNP) && defined(HAVE_SPAWN_H)
posix_spawn_file_actions_t actions;
posix_spawnattr_t attr;
if (posix_spawn_file_actions_init(&actions) != 0)
@throw [OFInitializationFailedException
exceptionWithClass: self.class];
|