未验证 提交 a2814f6b 编写于 作者: O openharmony_ci 提交者: Gitee

!152 feat: 支持IPC容器

Merge pull request !152 from zhushengle/ipc_container
...@@ -703,6 +703,14 @@ static void copy_fd_table(struct fd_table_s *new_fdt, struct fd_table_s *old_fdt ...@@ -703,6 +703,14 @@ static void copy_fd_table(struct fd_table_s *new_fdt, struct fd_table_s *old_fdt
#if defined(LOSCFG_COMPAT_POSIX) #if defined(LOSCFG_COMPAT_POSIX)
if ((sysFd >= MQUEUE_FD_OFFSET) && (sysFd < (MQUEUE_FD_OFFSET + CONFIG_NQUEUE_DESCRIPTORS))) if ((sysFd >= MQUEUE_FD_OFFSET) && (sysFd < (MQUEUE_FD_OFFSET + CONFIG_NQUEUE_DESCRIPTORS)))
{ {
#if defined(LOSCFG_IPC_CONTAINER)
if (OsCurrTaskGet()->cloneIpc)
{
FD_CLR(i, new_fdt->proc_fds);
new_fdt->ft_fds[i].sysFd = -1;
continue;
}
#endif
MqueueRefer(sysFd); MqueueRefer(sysFd);
} }
#endif #endif
...@@ -857,6 +865,13 @@ void delete_files(struct files_struct *files) ...@@ -857,6 +865,13 @@ void delete_files(struct files_struct *files)
return; return;
} }
#ifdef LOSCFG_CHROOT
if ((files->rootVnode != NULL) && (files->rootVnode->useCount > 0))
{
files->rootVnode->useCount--;
}
#endif
if (files->fdt == NULL) if (files->fdt == NULL)
{ {
goto out_file; goto out_file;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册