Skip to content

Conversation

@cadencemarseille
Copy link
Contributor

The problem was that std::run::Process::new() was unwrap()ing the result
of std::io::process::Process::new(), which returns None in the case
where the io_error condition is raised to signal failure to start the
process.

Have std::run::Process::new() similarly return an Optionrun::Process
to reflect the fact that a subprocess might have failed to start. Update
utility functions run::process_status() and run::process_output() to
return Option and Option, respectively.

Various parts of librustc and librustpkg needed to be updated to reflect
these API changes.

closes #10754

@cadencemarseille
Copy link
Contributor Author

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that this patch also fixes #10755. (hurray!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@klutzy That's interesting, although I don't know why this patch would fix the issue because the io_error condition is still raised.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cadencemarseille Oops, I misread your patch so my comment above is invalid. (I didn't actually build your patch so it's possible to not fix it.) Could you fix #10755 as well? I think it's simple to just catch io_error here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I will look into #10755 next.

@cadencemarseille
Copy link
Contributor Author

I missed some files in src/compiletest, so I am working on a revised patch.

The problem was that std::run::Process::new() was unwrap()ing the result
of std::io::process::Process::new(), which returns None in the case
where the io_error condition is raised to signal failure to start the
process.

Have std::run::Process::new() similarly return an Option<run::Process>
to reflect the fact that a subprocess might have failed to start. Update
utility functions run::process_status() and run::process_output() to
return Option<ProcessExit> and Option<ProcessOutput>, respectively.

Various parts of librustc and librustpkg needed to be updated to reflect
these API changes.

closes rust-lang#10754
bors added a commit that referenced this pull request Dec 14, 2013
…ap-on-None, r=alexcrichton

The problem was that std::run::Process::new() was unwrap()ing the result
of std::io::process::Process::new(), which returns None in the case
where the io_error condition is raised to signal failure to start the
process.

Have std::run::Process::new() similarly return an Option\<run::Process\>
to reflect the fact that a subprocess might have failed to start. Update
utility functions run::process_status() and run::process_output() to
return Option\<ProcessExit\> and Option\<ProcessOutput\>, respectively.

Various parts of librustc and librustpkg needed to be updated to reflect
these API changes.

closes #10754
@bors bors closed this Dec 14, 2013
@bors bors merged commit 5de4270 into rust-lang:master Dec 14, 2013
cadencemarseille added a commit to cadencemarseille/rust-pcre that referenced this pull request Dec 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

std::run functions fail after io_error

4 participants