@@ -46,61 +46,6 @@ pub trait RemoteCallback {
46
46
fn fire ( & mut self ) ;
47
47
}
48
48
49
- /// Data needed to spawn a process. Serializes the `std::io::process::Command`
50
- /// builder.
51
- pub struct ProcessConfig < ' a > {
52
- /// Path to the program to run.
53
- pub program : & ' a CString ,
54
-
55
- /// Arguments to pass to the program (doesn't include the program itself).
56
- pub args : & ' a [ CString ] ,
57
-
58
- /// Optional environment to specify for the program. If this is None, then
59
- /// it will inherit the current process's environment.
60
- pub env : Option < & ' a [ ( & ' a CString , & ' a CString ) ] > ,
61
-
62
- /// Optional working directory for the new process. If this is None, then
63
- /// the current directory of the running process is inherited.
64
- pub cwd : Option < & ' a CString > ,
65
-
66
- /// Configuration for the child process's stdin handle (file descriptor 0).
67
- /// This field defaults to `CreatePipe(true, false)` so the input can be
68
- /// written to.
69
- pub stdin : StdioContainer ,
70
-
71
- /// Configuration for the child process's stdout handle (file descriptor 1).
72
- /// This field defaults to `CreatePipe(false, true)` so the output can be
73
- /// collected.
74
- pub stdout : StdioContainer ,
75
-
76
- /// Configuration for the child process's stdout handle (file descriptor 2).
77
- /// This field defaults to `CreatePipe(false, true)` so the output can be
78
- /// collected.
79
- pub stderr : StdioContainer ,
80
-
81
- /// Any number of streams/file descriptors/pipes may be attached to this
82
- /// process. This list enumerates the file descriptors and such for the
83
- /// process to be spawned, and the file descriptors inherited will start at
84
- /// 3 and go to the length of this array. The first three file descriptors
85
- /// (stdin/stdout/stderr) are configured with the `stdin`, `stdout`, and
86
- /// `stderr` fields.
87
- pub extra_io : & ' a [ StdioContainer ] ,
88
-
89
- /// Sets the child process's user id. This translates to a `setuid` call in
90
- /// the child process. Setting this value on windows will cause the spawn to
91
- /// fail. Failure in the `setuid` call on unix will also cause the spawn to
92
- /// fail.
93
- pub uid : Option < uint > ,
94
-
95
- /// Similar to `uid`, but sets the group id of the child process. This has
96
- /// the same semantics as the `uid` field.
97
- pub gid : Option < uint > ,
98
-
99
- /// If true, the child process is spawned in a detached state. On unix, this
100
- /// means that the child is the leader of a new process group.
101
- pub detach : bool ,
102
- }
103
-
104
49
pub struct LocalIo < ' a > {
105
50
factory : & ' a mut IoFactory +' a ,
106
51
}
@@ -170,10 +115,6 @@ impl<'a> LocalIo<'a> {
170
115
171
116
pub trait IoFactory {
172
117
fn timer_init ( & mut self ) -> IoResult < Box < RtioTimer + Send > > ;
173
- fn spawn ( & mut self , cfg : ProcessConfig )
174
- -> IoResult < ( Box < RtioProcess + Send > ,
175
- Vec < Option < Box < RtioPipe + Send > > > ) > ;
176
- fn kill ( & mut self , pid : libc:: pid_t , signal : int ) -> IoResult < ( ) > ;
177
118
fn tty_open ( & mut self , fd : c_int , readable : bool )
178
119
-> IoResult < Box < RtioTTY + Send > > ;
179
120
}
@@ -184,13 +125,6 @@ pub trait RtioTimer {
184
125
fn period ( & mut self , msecs : u64 , cb : Box < Callback + Send > ) ;
185
126
}
186
127
187
- pub trait RtioProcess {
188
- fn id ( & self ) -> libc:: pid_t ;
189
- fn kill ( & mut self , signal : int ) -> IoResult < ( ) > ;
190
- fn wait ( & mut self ) -> IoResult < ProcessExit > ;
191
- fn set_timeout ( & mut self , timeout : Option < u64 > ) ;
192
- }
193
-
194
128
pub trait RtioPipe {
195
129
fn read ( & mut self , buf : & mut [ u8 ] ) -> IoResult < uint > ;
196
130
fn write ( & mut self , buf : & [ u8 ] ) -> IoResult < ( ) > ;
0 commit comments