@@ -45,10 +45,10 @@ pub struct Process {
45
45
/// Some(fd), or None when stdin is being redirected from a fd not created by Process::new.
46
46
priv input : Option < c_int > ,
47
47
48
- /// Some(fd ), or None when stdout is being redirected to a fd not created by Process::new.
48
+ /// Some(file ), or None when stdout is being redirected to a fd not created by Process::new.
49
49
priv output : Option < * libc:: FILE > ,
50
50
51
- /// Some(fd ), or None when stderr is being redirected to a fd not created by Process::new.
51
+ /// Some(file ), or None when stderr is being redirected to a fd not created by Process::new.
52
52
priv error : Option < * libc:: FILE > ,
53
53
54
54
/// None until finish() is called.
@@ -191,23 +191,23 @@ pub impl Process {
191
191
/// Returns the unique id of the process
192
192
fn get_id ( & self ) -> pid_t { self . pid }
193
193
194
- priv fn unwrap_input ( & mut self ) -> c_int {
194
+ priv fn input_fd ( & mut self ) -> c_int {
195
195
match self . input {
196
196
Some ( fd) => fd,
197
197
None => fail ! ( "This Process's stdin was redirected to an \
198
198
existing file descriptor.")
199
199
}
200
200
}
201
201
202
- priv fn unwrap_output ( & mut self ) -> * libc:: FILE {
202
+ priv fn output_file ( & mut self ) -> * libc:: FILE {
203
203
match self . output {
204
204
Some ( file) => file,
205
205
None => fail ! ( "This Process's stdout was redirected to an \
206
206
existing file descriptor.")
207
207
}
208
208
}
209
209
210
- priv fn unwrap_error ( & mut self ) -> * libc:: FILE {
210
+ priv fn error_file ( & mut self ) -> * libc:: FILE {
211
211
match self . error {
212
212
Some ( file) => file,
213
213
None => fail ! ( "This Process's stderr was redirected to an \
@@ -255,7 +255,7 @@ pub impl Process {
255
255
*/
256
256
fn input ( & mut self ) -> @io:: Writer {
257
257
// FIXME: the Writer can still be used after self is destroyed: #2625
258
- io:: fd_writer ( self . unwrap_input ( ) , false )
258
+ io:: fd_writer ( self . input_fd ( ) , false )
259
259
}
260
260
261
261
/**
@@ -265,7 +265,7 @@ pub impl Process {
265
265
*/
266
266
fn output ( & mut self ) -> @io:: Reader {
267
267
// FIXME: the Reader can still be used after self is destroyed: #2625
268
- io:: FILE_reader ( self . unwrap_output ( ) , false )
268
+ io:: FILE_reader ( self . output_file ( ) , false )
269
269
}
270
270
271
271
/**
@@ -275,7 +275,7 @@ pub impl Process {
275
275
*/
276
276
fn error ( & mut self ) -> @io:: Reader {
277
277
// FIXME: the Reader can still be used after self is destroyed: #2625
278
- io:: FILE_reader ( self . unwrap_error ( ) , false )
278
+ io:: FILE_reader ( self . error_file ( ) , false )
279
279
}
280
280
281
281
/**
@@ -341,8 +341,8 @@ pub impl Process {
341
341
*/
342
342
fn finish_with_output ( & mut self ) -> ProcessOutput {
343
343
344
- let output_file = self . unwrap_output ( ) ;
345
- let error_file = self . unwrap_error ( ) ;
344
+ let output_file = self . output_file ( ) ;
345
+ let error_file = self . error_file ( ) ;
346
346
347
347
// Spawn two entire schedulers to read both stdout and sterr
348
348
// in parallel so we don't deadlock while blocking on one
@@ -814,7 +814,7 @@ pub fn process_output(prog: &str, args: &[~str]) -> ProcessOutput {
814
814
*
815
815
* Note that this is private to avoid race conditions on unix where if
816
816
* a user calls waitpid(some_process.get_id()) then some_process.finish()
817
- * and some_process.destroy() and some_process.drop () will then either
817
+ * and some_process.destroy() and some_process.finalize () will then either
818
818
* operate on a none-existant process or, even worse, on a newer process
819
819
* with the same id.
820
820
*/
0 commit comments