rt-thread-official/components
Shell e5cf86267b
[smart] fixup of script execution (#9009)
This patch fixup the script execution capabilities on argv passing
and adds support for arguments larger than 4k.

According to POSIX, the script parameter is quiet different
from the current implementation. Especially on the way it inserts
the path of executables. At the end, when you execute a script
from `$PATH`, it always fails.

For the script, interpreter will be invoked with the following
arguments: `{interpreter [optional-arg] pathname arg...}`
where pathname is the pathname of the file specified as the first
argument of execve(), and arg...  is the series of words pointed
to by the argv argument of execve(), starting at argv[1].  Note that
there is no way to get the argv[0] that was passed to the
execve() call.

The changes include:

- Separating argument, environment variable, and auxiliary vector
  processing into a new lwp_args.c file.
- Fixing bugs in script argument processing and supporting arguments
  larger than 4k.
- Updating lwp_execve to use the new argscopy function and removing
  the old lwp_argscopy function.
- Making various modifications to lwp_load and elf_aux_fill to work
  with the new argument processing.
- Removing unnecessary code related to dynamic loading and interpreter
  scripts.

Signed-off-by: Shell <smokewood@qq.com>
2024-05-31 17:32:19 +08:00
..
dfs [dfsv2] fixup out-of-memory access (#8973) 2024-05-21 19:45:08 +08:00
drivers dev: random should copy size bytes of data to buffer (#9012) 2024-05-30 20:09:02 +08:00
fal [fal]修正类型不匹配 2024-04-12 19:00:41 -04:00
finsh [finsh] remove finsh_syscall_lookup() function declaration 2024-03-31 20:31:35 -04:00
legacy [rtdef] use lower-case to define attributes (#6728) 2022-12-11 13:12:03 -05:00
libc 修复C++11 thread_local对象析构函数与实际内存释放动作顺序相反问题 2024-05-11 13:50:02 -04:00
lwp [smart] fixup of script execution (#9009) 2024-05-31 17:32:19 +08:00
mm [libcpu/arm64] dealing with mem region out of kernel space (#8847) 2024-05-08 09:23:31 +08:00
mprotect 实现MPU抽象层 (#8080) 2023-10-30 08:24:55 -04:00
net fix specified network card not taking effect with msh's ping error (#8937) 2024-05-16 15:43:50 +08:00
utilities 解决LOG_RAW异步输出多条文本的时候会被截断,原因是rt_vsnprintf会在字符串最后添加\0,ulog.c中的do_output()将\0也压入到ulog.async_rb,当LOG_RAW没有及时输出,那么rb中的字符串被\0截断了,导致没法正确输出LOG_RAW信息 2024-04-19 22:27:33 -04:00
vbus 🎯 Sync smart & scheduler codes (#8537) 2024-02-23 17:49:15 +08:00
Kconfig [msh] add dependency of RT_USING_CONSOLE 2023-12-01 14:43:05 +08:00
SConscript [components] 移除对老版本bsp的lwip版本默认选定 2021-06-28 15:33:14 +08:00