diff --git a/apps/shell/src/shmsg.c b/apps/shell/src/shmsg.c index 37cd32ef3b645d9aafbfbfd1aa6f4290902d1bb8..40a18d7ce6c3238d91365d79fa8cd222246395ed 100644 --- a/apps/shell/src/shmsg.c +++ b/apps/shell/src/shmsg.c @@ -364,11 +364,13 @@ void ChildExec(const char *cmdName, char *const paramArray[]) gid = getpgrp(); if (gid < 0) { printf("get group id failed, pgrpid %d, errno %d\n", gid, errno); + exit(1); } ret = tcsetpgrp(STDIN_FILENO, gid); if (ret != 0) { printf("tcsetpgrp failed, errno %d\n", errno); + exit(1); } ret = execve(cmdName, paramArray, NULL); diff --git a/compat/posix/src/misc.c b/compat/posix/src/misc.c index 3950d95c9e00ec5cf4148f41acb18da2b635a664..d3ae7e4d66d0b15319eb17a8a7afcecdee18f27f 100644 --- a/compat/posix/src/misc.c +++ b/compat/posix/src/misc.c @@ -40,7 +40,6 @@ #include "los_process_pri.h" #include "los_hw.h" -static struct rlimit g_defaultLimit = { 0 }; /* * Supply some suitable values for constants that may not be present * in all configurations. @@ -168,7 +167,10 @@ int getrlimit(int resource, struct rlimit *rlim) } if (resourceLimit == NULL) { - resourceLimit = &g_defaultLimit; + rlim->rlim_cur = 0; + rlim->rlim_max = 0; + + return 0; } SCHEDULER_LOCK(intSave); diff --git a/kernel/extended/hidumper/los_hidumper.c b/kernel/extended/hidumper/los_hidumper.c index be365ecd38a7a1fb952d5e90777bf22d083bb3e6..ce86ec8aaa88660e8e941113cd5d0c2106a06219 100644 --- a/kernel/extended/hidumper/los_hidumper.c +++ b/kernel/extended/hidumper/los_hidumper.c @@ -319,7 +319,7 @@ static INT32 HiDumperIoctl(struct file *filep, INT32 cmd, unsigned long arg) break; case HIDUMPER_MEM_DATA: if (g_adapter.DumpMemData != NULL) { - g_adapter.DumpMemData((struct MemDumpParam *)arg); + g_adapter.DumpMemData((struct MemDumpParam *)((UINTPTR)arg)); } break; default: diff --git a/syscall/fs_syscall.c b/syscall/fs_syscall.c index ba787462fb4ed4611e7a1ebb9323c5dc3073e403..da90e29357326e6cd148fe6e6d4f384ab0573382 100755 --- a/syscall/fs_syscall.c +++ b/syscall/fs_syscall.c @@ -2570,7 +2570,7 @@ int SysPselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, ((struct timeval *)timeout)->tv_usec = timeout->tv_nsec / 1000; /* 1000, convert ns to us */ if (data != NULL) { - retVal = LOS_ArchCopyFromUser(&(setl.sig[0]), (int *)data[0], sizeof(sigset_t)); + retVal = LOS_ArchCopyFromUser(&(setl.sig[0]), (int *)((UINTPTR)data[0]), sizeof(sigset_t)); if (retVal != 0) { ret = -EFAULT; FREE_DUP(timeout);