diff --git a/bash-5.1/r_execute_cmd/src/lib.rs b/bash-5.1/r_execute_cmd/src/lib.rs index 1509741e0c8283d4af08b0ac478c80131928deec..923570f4bb82ed077e12587ce5b23ae1c2ce9615 100644 --- a/bash-5.1/r_execute_cmd/src/lib.rs +++ b/bash-5.1/r_execute_cmd/src/lib.rs @@ -1726,8 +1726,44 @@ pub unsafe extern "C" fn cpl_flush() coproc_list.ncoproc = 0; } +pub unsafe extern "C" fn cpl_closeall() +{ + let mut cpe:*mut cpelement; + + cpe = coproc_list.head; + while !cpe.is_null() { + coproc_close((*cpe).coproc); + cpe = (*cpe).next; + } +} +pub unsafe extern "C" fn cpl_fdchk(fd:c_int) +{ + let mut cpe:*mut cpelement; + + cpe = coproc_list.head; + while !cpe.is_null() { + coproc_checkfd((*cpe).coproc, fd); + + cpe = (*cpe).next; + } +} + +pub unsafe extern "C" fn cpl_search(pid:pid_t)-> *mut cpelement +{ + let mut cpe:*mut cpelement; + + cpe = coproc_list.head; + while !cpe.is_null() { + if (*(*cpe).coproc).c_pid == pid{ + return cpe; + } + cpe = (*cpe).next; + } + + return 0 as *mut cpelement; +}