You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: callproc.rs
    path of file: ./repos/remacs/rust_src/src
    
    the code of the file until where you have to start completion: //! Synchronous subprocess invocation for GNU Emacs.

use libc::O_RDONLY;

use crate::{
    buffers,
    coding::encode_file_name,
    eval::{record_unwind_protect_int, unbind_to},
    fileio::expand_file_name,
    lisp::LispObject,
    remacs_macros::lisp_fn,
    remacs_sys::Fdelete_region,
    remacs_sys::Qnil,
    remacs_sys::NULL_DEVICE,
    remacs_sys::{
        build_string, call_process, close_file_unwind, create_temp_file, emacs_open,
        report_file_error,
    },
    
pub fn call_process_lisp(args: &mut [LispObject]) -> LispObject {
    let count = c_specpdl_index();

    let infile = if args.len() >= 2 && args[1].is_not_nil() {
        expand_file_name(
            args[1].into(),
            ThreadState::current_buffer_unchecked().directory_.into(),
        )
    } else {
        unsafe { build_string(NULL_DEVICE.as_ptr() as *const libc::c_char) }.into()
    };

    let encoded_file = encode_file_name(infile);

    let filefd = unsafe {
        emacs_open(
            encoded_file.const_data_ptr() as *const libc::c_char,
            libc::O_RDONLY,
            0,
        )
    };

    if filefd < 0 {
        unsafe {
            report_file_error(
                "Opening process input file".as_ptr() as *const libc::c_char,
                infile.into(),
            )
        };
    }

    unsafe { record_unwind_protect_int(Some(close_file_unwind), filefd) };

    unbind_to(count, unsafe {
        call_process(
            args.len() as isize,
            args.as_mut_ptr() as *mut LispObject,
            filefd,
            -1,
        )
    })
}