(
fd: RawFd,
api_notifier: EventFd,
api_sender: Sender<ApiRequest>,
seccomp_action: &SeccompAction,
exit_evt: EventFd,
hypervisor_type: HypervisorType,
landlock_enable: boo
| 431 | } |
| 432 | |
| 433 | pub fn start_http_fd_thread( |
| 434 | fd: RawFd, |
| 435 | api_notifier: EventFd, |
| 436 | api_sender: Sender<ApiRequest>, |
| 437 | seccomp_action: &SeccompAction, |
| 438 | exit_evt: EventFd, |
| 439 | hypervisor_type: HypervisorType, |
| 440 | landlock_enable: bool, |
| 441 | ) -> Result<HttpApiHandle> { |
| 442 | // SAFETY: Valid FD |
| 443 | let server = unsafe { HttpServer::new_from_fd(fd) }.map_err(VmmError::CreateApiServer)?; |
| 444 | start_http_thread( |
| 445 | server, |
| 446 | api_notifier, |
| 447 | api_sender, |
| 448 | seccomp_action, |
| 449 | exit_evt, |
| 450 | hypervisor_type, |
| 451 | landlock_enable, |
| 452 | ) |
| 453 | } |
| 454 | |
| 455 | pub fn http_api_graceful_shutdown(http_handle: HttpApiHandle) -> Result<()> { |
| 456 | let (api_thread, api_shutdown_fd) = http_handle; |
no test coverage detected