Skip to content

Commit 0e4b7c5

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 271421 b: refs/heads/auto c: f88a1e6 h: refs/heads/master i: 271419: a8e912a
1 parent f26e4c0 commit 0e4b7c5

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
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: aa7fe93d4a6217dd6f2538bce857ab6a097afbeb
11+
refs/heads/auto: f88a1e6f21c000f2d3b2e71778a7fa655cd8423c
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/libstd/sys/unix/process.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -335,25 +335,25 @@ impl Command {
335335
// have the drop glue anyway because this code never returns (the
336336
// child will either exec() or invoke libc::exit)
337337
unsafe fn do_exec(&mut self, stdio: ChildPipes) -> io::Error {
338-
macro_rules! try {
338+
macro_rules! t {
339339
($e:expr) => (match $e {
340340
Ok(e) => e,
341341
Err(e) => return e,
342342
})
343343
}
344344

345345
if let Some(fd) = stdio.stdin.fd() {
346-
cvt_r(|| libc::dup2(fd, libc::STDIN_FILENO))?;
346+
t!(cvt_r(|| libc::dup2(fd, libc::STDIN_FILENO)));
347347
}
348348
if let Some(fd) = stdio.stdout.fd() {
349-
cvt_r(|| libc::dup2(fd, libc::STDOUT_FILENO))?;
349+
t!(cvt_r(|| libc::dup2(fd, libc::STDOUT_FILENO)));
350350
}
351351
if let Some(fd) = stdio.stderr.fd() {
352-
cvt_r(|| libc::dup2(fd, libc::STDERR_FILENO))?;
352+
t!(cvt_r(|| libc::dup2(fd, libc::STDERR_FILENO)));
353353
}
354354

355355
if let Some(u) = self.gid {
356-
cvt(libc::setgid(u as gid_t))?;
356+
t!(cvt(libc::setgid(u as gid_t)));
357357
}
358358
if let Some(u) = self.uid {
359359
// When dropping privileges from root, the `setgroups` call
@@ -365,7 +365,7 @@ impl Command {
365365
// privilege dropping function.
366366
let _ = libc::setgroups(0, ptr::null());
367367

368-
cvt(libc::setuid(u as uid_t))?;
368+
t!(cvt(libc::setuid(u as uid_t)));
369369
}
370370
if self.session_leader {
371371
// Don't check the error of setsid because it fails if we're the
@@ -374,7 +374,7 @@ impl Command {
374374
let _ = libc::setsid();
375375
}
376376
if let Some(ref cwd) = self.cwd {
377-
cvt(libc::chdir(cwd.as_ptr()))?;
377+
t!(cvt(libc::chdir(cwd.as_ptr())));
378378
}
379379
if let Some(ref envp) = self.envp {
380380
*sys::os::environ() = envp.as_ptr();
@@ -390,17 +390,17 @@ impl Command {
390390
// need to clean things up now to avoid confusing the program
391391
// we're about to run.
392392
let mut set: libc::sigset_t = mem::uninitialized();
393-
cvt(libc::sigemptyset(&mut set))?;
394-
cvt(libc::pthread_sigmask(libc::SIG_SETMASK, &set,
395-
ptr::null_mut()))?;
393+
t!(cvt(libc::sigemptyset(&mut set)));
394+
t!(cvt(libc::pthread_sigmask(libc::SIG_SETMASK, &set,
395+
ptr::null_mut())));
396396
let ret = libc::signal(libc::SIGPIPE, libc::SIG_DFL);
397397
if ret == libc::SIG_ERR {
398398
return io::Error::last_os_error()
399399
}
400400
}
401401

402402
for callback in self.closures.iter_mut() {
403-
callback()?;
403+
t!(callback());
404404
}
405405

406406
libc::execvp(self.argv[0], self.argv.as_ptr());

0 commit comments

Comments
 (0)