Fix format of syscall macro

This commit is contained in:
Taiki Endo 2021-04-24 17:45:09 +09:00
parent 7d9dc0b914
commit 4831e3cbb9
1 changed files with 2 additions and 2 deletions

View File

@ -940,12 +940,12 @@ impl Command {
}
}
/// Moves `Fd` out of non-blocking mode.
#[cfg(unix)]
/// Moves `Fd` out of nonblocking mode.
fn blocking_fd(fd: std::os::unix::io::RawFd) -> io::Result<()> {
// Helper macro to execute a system call that returns an `io::Result`.
macro_rules! syscall {
($fn: ident ( $($arg: expr),* $(,)* ) ) => {{
($fn:ident ( $($arg:expr),* $(,)? ) ) => {{
let res = unsafe { libc::$fn($($arg, )*) };
if res == -1 {
return Err(std::io::Error::last_os_error());