use proxmox::tools::fd::fd_change_cloexec from proxmox 0.15.3

Depend on proxmox 0.15.3

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer
2021-11-18 13:43:41 +01:00
parent 26e949d5fe
commit 860eaec58f
18 changed files with 21 additions and 35 deletions

View File

@ -13,6 +13,8 @@ use serde_json::{json, Value};
use tokio::io::{AsyncBufReadExt, BufReader};
use proxmox::{identity, sortable};
use proxmox::tools::fd::fd_change_cloexec;
use proxmox_router::{
ApiHandler, ApiMethod, ApiResponseFuture, Permission, RpcEnvironment, Router, SubdirMap,
};
@ -152,7 +154,7 @@ async fn termproxy(cmd: Option<String>, rpcenv: &mut dyn RpcEnvironment) -> Resu
move |worker| async move {
// move inside the worker so that it survives and does not close the port
// remove CLOEXEC from listenere so that we can reuse it in termproxy
pbs_tools::fd::fd_change_cloexec(listener.as_raw_fd(), false)?;
fd_change_cloexec(listener.as_raw_fd(), false)?;
let mut arguments: Vec<&str> = Vec::new();
let fd_string = listener.as_raw_fd().to_string();