diff options
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/shell.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/shell.rs b/src/tools/shell.rs index 29d2375..6f095c6 100644 --- a/src/tools/shell.rs +++ b/src/tools/shell.rs | |||
| @@ -61,9 +61,10 @@ pub fn bash( | |||
| 61 | .process_group(0); | 61 | .process_group(0); |
| 62 | unsafe { | 62 | unsafe { |
| 63 | command.pre_exec(|| { | 63 | command.pre_exec(|| { |
| 64 | // rlim_t is u32 on i686 and u64 on x86-64. | ||
| 64 | let limit = libc::rlimit { | 65 | let limit = libc::rlimit { |
| 65 | rlim_cur: MAX_OUTPUT_BYTES, | 66 | rlim_cur: MAX_OUTPUT_BYTES as libc::rlim_t, |
| 66 | rlim_max: MAX_OUTPUT_BYTES, | 67 | rlim_max: MAX_OUTPUT_BYTES as libc::rlim_t, |
| 67 | }; | 68 | }; |
| 68 | if libc::setrlimit(libc::RLIMIT_FSIZE, &limit) != 0 { | 69 | if libc::setrlimit(libc::RLIMIT_FSIZE, &limit) != 0 { |
| 69 | return Err(std::io::Error::last_os_error()); | 70 | return Err(std::io::Error::last_os_error()); |
