Skip to content

Commit 50d5f8a

Browse files
garethgareth
authored andcommitted
---
yaml --- r: 73471 b: refs/heads/dist-snap c: 04a3935 h: refs/heads/master i: 73469: 0e25a82 73467: a55476f 73463: 405f8a7 73455: 6386c49 73439: b79aa99 73407: f5beeaa 73343: 886b5f8 73215: 9e7beb4 v: v3
1 parent 182b787 commit 50d5f8a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 49a1ab8745338e6ac6da65c3fc4e541761f6c760
10+
refs/heads/dist-snap: 04a39359f86e7bc9700027139c2e6c8d27c67eba
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libstd/run.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ pub struct Process {
4545
/// Some(fd), or None when stdin is being redirected from a fd not created by Process::new.
4646
priv input: Option<c_int>,
4747

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.
4949
priv output: Option<*libc::FILE>,
5050

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.
5252
priv error: Option<*libc::FILE>,
5353

5454
/// None until finish() is called.
@@ -191,23 +191,23 @@ pub impl Process {
191191
/// Returns the unique id of the process
192192
fn get_id(&self) -> pid_t { self.pid }
193193

194-
priv fn unwrap_input(&mut self) -> c_int {
194+
priv fn input_fd(&mut self) -> c_int {
195195
match self.input {
196196
Some(fd) => fd,
197197
None => fail!("This Process's stdin was redirected to an \
198198
existing file descriptor.")
199199
}
200200
}
201201

202-
priv fn unwrap_output(&mut self) -> *libc::FILE {
202+
priv fn output_file(&mut self) -> *libc::FILE {
203203
match self.output {
204204
Some(file) => file,
205205
None => fail!("This Process's stdout was redirected to an \
206206
existing file descriptor.")
207207
}
208208
}
209209

210-
priv fn unwrap_error(&mut self) -> *libc::FILE {
210+
priv fn error_file(&mut self) -> *libc::FILE {
211211
match self.error {
212212
Some(file) => file,
213213
None => fail!("This Process's stderr was redirected to an \
@@ -255,7 +255,7 @@ pub impl Process {
255255
*/
256256
fn input(&mut self) -> @io::Writer {
257257
// 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)
259259
}
260260

261261
/**
@@ -265,7 +265,7 @@ pub impl Process {
265265
*/
266266
fn output(&mut self) -> @io::Reader {
267267
// 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)
269269
}
270270

271271
/**
@@ -275,7 +275,7 @@ pub impl Process {
275275
*/
276276
fn error(&mut self) -> @io::Reader {
277277
// 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)
279279
}
280280

281281
/**
@@ -341,8 +341,8 @@ pub impl Process {
341341
*/
342342
fn finish_with_output(&mut self) -> ProcessOutput {
343343

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();
346346

347347
// Spawn two entire schedulers to read both stdout and sterr
348348
// in parallel so we don't deadlock while blocking on one
@@ -814,7 +814,7 @@ pub fn process_output(prog: &str, args: &[~str]) -> ProcessOutput {
814814
*
815815
* Note that this is private to avoid race conditions on unix where if
816816
* 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
818818
* operate on a none-existant process or, even worse, on a newer process
819819
* with the same id.
820820
*/

0 commit comments

Comments
 (0)