mirror of
https://github.com/openharmony/third_party_NuttX.git
synced 2026-07-01 08:17:34 -04:00
!152 feat: 支持IPC容器
Merge pull request !152 from zhushengle/ipc_container
This commit is contained in:
@@ -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 ((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);
|
||||
}
|
||||
#endif
|
||||
@@ -857,6 +865,13 @@ void delete_files(struct files_struct *files)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef LOSCFG_CHROOT
|
||||
if ((files->rootVnode != NULL) && (files->rootVnode->useCount > 0))
|
||||
{
|
||||
files->rootVnode->useCount--;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (files->fdt == NULL)
|
||||
{
|
||||
goto out_file;
|
||||
|
||||
Reference in New Issue
Block a user