diff --git a/bash-5.1/.reuse/dep5.txt b/bash-5.1/.reuse/dep5.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c4660337a0885182b57208c744c4933cb92bd839
--- /dev/null
+++ b/bash-5.1/.reuse/dep5.txt
@@ -0,0 +1,13 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Copyright:2022 UnionTech Software Technology Co., Ltd.
+License:GPL-3.0-only
+
+This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along with this program. If not, see.
+
+Files: *
+Copyright: 2022 UnionTech Software Technology Co., Ltd.
+License: GPL-3.0-only
diff --git a/bash-5.1/Cargo.toml b/bash-5.1/Cargo.toml
index 68e7298d46d9abd37ac7e11862095e6bb5c9ce0b..87ccd3a0269ba34196c9eb01287cb92d0d552724 100644
--- a/bash-5.1/Cargo.toml
+++ b/bash-5.1/Cargo.toml
@@ -2,10 +2,6 @@
name = "rsbash"
version = "0.1.0"
edition = "2018"
-build = "build.rs"
-
-[build-dependencies]
-bindgen = "0.20.0"
[lib]
name = "rsbash"
@@ -66,12 +62,10 @@ members=[
"builtins_rust/setattr",
"builtins_rust/source",
"builtins_rust/exec_cmd",
- "u_src",
]
[dependencies]
libc = "*"
- bindgen = "*"
rread = {path = "./builtins_rust/read"}
rhistory = {path = "./builtins_rust/history"}
rkill = {path = "./builtins_rust/kill"}
@@ -108,5 +102,3 @@ members=[
rwait = {path = "./builtins_rust/wait"}
rdeclare = {path = "./builtins_rust/declare"}
rexec_cmd = {path = "./builtins_rust/exec_cmd"}
-
- r_main = {path = "./u_src"}
diff --git a/bash-5.1/Makefile.in b/bash-5.1/Makefile.in
index d94c71812c2ae78cb152da43417d74758a688e9f..dd1c8a4f2c61d16e4e293c1b55481b1bd0d2a2b2 100644
--- a/bash-5.1/Makefile.in
+++ b/bash-5.1/Makefile.in
@@ -139,7 +139,7 @@ LOCALE_DEFS = -DLOCALEDIR='"$(localedir)"' -DPACKAGE='"$(PACKAGE)"'
LOCAL_LIBS = @LOCAL_LIBS@
-LIBS = $(BUILTINS_LIB) $(LIBRARIES) @LIBS@ -lrt -lpthread -L./target/debug -lralias -lrbind -lrbreak -lrbuiltin -lrcaller -lrcd -lrcolon -lrcommon -lcommand -lrcomplete -lrdeclare -lrecho -lrenable -lreval -lrexec -lrexit -lrfc -lrfg_bg -lrgetopts -lrhash -lrexit -lrhelp -lrhistory -lrjobs -lrkill -lrmapfile -lrpushd -lrread -lrlet -lrreturn -lrset -lrsetattr -lrshift -lrshopt -lrsource -lrsuspend -lrtest -lrtimes -lrtrap -lrtype -lrulimit -lrumask -lrwait -lrprintf -lrexec_cmd -lr_main
+LIBS = $(BUILTINS_LIB) $(LIBRARIES) @LIBS@ -lrt -lpthread -L./target/debug -lralias -lrbind -lrbreak -lrbuiltin -lrcaller -lrcd -lrcolon -lrcommon -lcommand -lrcomplete -lrdeclare -lrecho -lrenable -lreval -lrexec -lrexit -lrfc -lrfg_bg -lrgetopts -lrhash -lrexit -lrhelp -lrhistory -lrjobs -lrkill -lrmapfile -lrpushd -lrread -lrlet -lrreturn -lrset -lrsetattr -lrshift -lrshopt -lrsource -lrsuspend -lrtest -lrtimes -lrtrap -lrtype -lrulimit -lrumask -lrwait -lrprintf -lrexec_cmd
LIBS_FOR_BUILD =
STATIC_LD = @STATIC_LD@
@@ -571,7 +571,7 @@ LANGSRC = $(srcdir)/$(LANGSUBDIR)
RUST_DIR = $(top_builddir)/builtins_rust
#RUST_TARGET_LIB = $(top_builddir)/target/debug/librjobs.a $(top_builddir)/target/debug/librread.a
-RUST_BUILTINS_DIRS = $(RUST_DIR)/alias $(RUST_DIR)/bind $(RUST_DIR)/break_1 $(RUST_DIR)/builtin $(RUST_DIR)/caller $(RUST_DIR)/cd $(RUST_DIR)/colon $(RUST_DIR)/command $(RUST_DIR)/common $(RUST_DIR)/complete $(RUST_DIR)/declare $(RUST_DIR)/echo $(RUST_DIR)/enable $(RUST_DIR)/eval $(RUST_DIR)/exit $(RUST_DIR)/fc $(RUST_DIR)/fg_bg $(RUST_DIR)/getopts $(RUST_DIR)/hash $(RUST_DIR)/help $(RUST_DIR)/history $(RUST_DIR)/jobs $(RUST_DIR)/kill $(RUST_DIR)/mapfile $(RUST_DIR)/printf $(RUST_DIR)/pushd $(RUST_DIR)/read $(RUST_DIR)/rlet $(RUST_DIR)/rreturn $(RUST_DIR)/set $(RUST_DIR)/setattr $(RUST_DIR)/shift $(RUST_DIR)/shopt $(RUST_DIR)/source $(RUST_DIR)/suspend $(RUST_DIR)/test $(RUST_DIR)/times $(RUST_DIR)/trap $(RUST_DIR)/type $(RUST_DIR)/ulimit $(RUST_DIR)/umask $(RUST_DIR)/wait $(RUST_DIR)/exec $(RUST_DIR)/exec_cmd $(RUST_DIR)/u_src
+RUST_BUILTINS_DIRS = $(RUST_DIR)/alias $(RUST_DIR)/bind $(RUST_DIR)/break_1 $(RUST_DIR)/builtin $(RUST_DIR)/caller $(RUST_DIR)/cd $(RUST_DIR)/colon $(RUST_DIR)/command $(RUST_DIR)/common $(RUST_DIR)/complete $(RUST_DIR)/declare $(RUST_DIR)/echo $(RUST_DIR)/enable $(RUST_DIR)/eval $(RUST_DIR)/exit $(RUST_DIR)/fc $(RUST_DIR)/fg_bg $(RUST_DIR)/getopts $(RUST_DIR)/hash $(RUST_DIR)/help $(RUST_DIR)/history $(RUST_DIR)/jobs $(RUST_DIR)/kill $(RUST_DIR)/mapfile $(RUST_DIR)/printf $(RUST_DIR)/pushd $(RUST_DIR)/read $(RUST_DIR)/rlet $(RUST_DIR)/rreturn $(RUST_DIR)/set $(RUST_DIR)/setattr $(RUST_DIR)/shift $(RUST_DIR)/shopt $(RUST_DIR)/source $(RUST_DIR)/suspend $(RUST_DIR)/test $(RUST_DIR)/times $(RUST_DIR)/trap $(RUST_DIR)/type $(RUST_DIR)/ulimit $(RUST_DIR)/umask $(RUST_DIR)/wait $(RUST_DIR)/exec $(RUST_DIR)/exec_cmd
# Keep GNU Make from exporting the entire environment for small machines.
diff --git a/bash-5.1/README.md b/bash-5.1/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..b92164fd5d17339f0308016a5a855310e97e59e4
--- /dev/null
+++ b/bash-5.1/README.md
@@ -0,0 +1,51 @@
+# utshell
+
+
+utshell is use rust rewrote bash. and enhanced security.
+now it is base on bash. and we will gradually remove dependence on bash.
+
+### Dependencies
+
+glibc, bash
+
+### Build dependencies
+
+glibc, bash
+
+## Installation
+
+
+### Build from source code
+
+./configure
+make
+make install
+
+## Documentations
+
+If any, link the documentation here. Please ensure the linked pages can be accessible from the public internet.
+
+- Link 1
+- Link 2
+- ...
+
+## Getting help
+
+- [Official Forum](https://bbs.deepin.org/) for generic discussion and help.
+- [Developer Center](https://github.com/linuxdeepin/developer-center) for BUG report and suggestions.
+- [Wiki](https://wiki.deepin.org/)
+(按照项目实际情况放帮助链接)
+
+## Getting involved
+
+We encourage you to report issues and contribute changes
+
+- [Contribution guide for developers](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers-en) (English)
+- [Translate for your language on Transifex](#) *please update to the actual Transifex link of this project*
+(按照项目实际情况放贡献指南链接)
+
+## License
+
+License description here. The license name is suggested to use the same one as [SPDX license identifier](https://spdx.org/licenses). Following is an example:
+
+utshell is licensed under [GPL-3.0-or-later](LICENSE)
diff --git a/bash-5.1/README.zh_CN.md b/bash-5.1/README.zh_CN.md
new file mode 100644
index 0000000000000000000000000000000000000000..6ceb27f745cbcdb65bb287f51e50cc1c98f706ec
--- /dev/null
+++ b/bash-5.1/README.zh_CN.md
@@ -0,0 +1,45 @@
+# 项目名称
+
+
+版权通知
+utshell属于统信软件产品,本产品在GPL v3版本下发行
+utshell是对bash的一次重写,并增强了安全性。
+
+### 依赖
+
+glibc bash
+
+### 编译依赖
+
+glibc bash
+
+## 安装
+
+如果是UOS桌面版本,请执行:
+sudo apt install utshell
+如果是UOS服务器版本,请执行:
+sudo dnf install utshell
+
+### 构建过程
+
+项目构建步骤
+
+## 文档
+
+
+## 帮助
+
+- [官方论坛](https://bbs.deepin.org/)
+- [开发者中心](https://github.com/linuxdeepin/developer-center)
+- [Wiki](https://wiki.deepin.org/)
+
+## 贡献指南
+
+我们鼓励您报告问题并做出更改
+
+- [开发者代码贡献指南](https://github.com/linuxdeepin/developer-center/wiki/Contribution-Guidelines-for-Developers)
+
+## 开源许可证
+
+许可证说明,建议使用SPDX规范描述许可证。例如:
+[utshell] 在 [GPL-3.0-or-later]下发布。
diff --git a/bash-5.1/alias.c b/bash-5.1/alias.c
index cd5e99b7e04e54b9b303b10f4e59e780b1fd869a..ced289d6ff3c7352d7a39ea303ff8ff30524b1d8 100644
--- a/bash-5.1/alias.c
+++ b/bash-5.1/alias.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* alias.c -- Not a full alias, but just the kind that we use in the
shell. Csh style alias is somewhere else (`over there, in a box'). */
diff --git a/bash-5.1/alias.h b/bash-5.1/alias.h
index 4e2d67c0fc738bf73adef563b1a054c00fe3d33f..2c7feda8b35392d8624a4479a526a73660f1afae 100644
--- a/bash-5.1/alias.h
+++ b/bash-5.1/alias.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* alias.h -- structure definitions. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/array.c b/bash-5.1/array.c
index 6d3554bf4cc5c4ef303fe402fe0dc3ea442b1c83..5e1d88d2e4c9e48c962df0ea0718427500dae188 100644
--- a/bash-5.1/array.c
+++ b/bash-5.1/array.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/*
* array.c - functions to create, destroy, access, and manipulate arrays
* of strings.
diff --git a/bash-5.1/array.h b/bash-5.1/array.h
index 189d646f2b012bc66986a2b7824b9dd305d05103..8a0e00a27791abf017f62ccf7db8b218e00976c4 100644
--- a/bash-5.1/array.h
+++ b/bash-5.1/array.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* array.h -- definitions for the interface exported by array.c that allows
the rest of the shell to manipulate array variables. */
diff --git a/bash-5.1/arrayfunc.c b/bash-5.1/arrayfunc.c
index 8231ba1eded7d704a4fc2067c24d9af4b59d07e4..dde6b90ede9442557041857931e8069fab68669f 100644
--- a/bash-5.1/arrayfunc.c
+++ b/bash-5.1/arrayfunc.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* arrayfunc.c -- High-level array functions used by other parts of the shell. */
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/arrayfunc.h b/bash-5.1/arrayfunc.h
index 838e76d2d484a08322f6544fa5d8462e0f2eb0b1..2420ccf92653fa142d3845ce907425dde821494c 100644
--- a/bash-5.1/arrayfunc.h
+++ b/bash-5.1/arrayfunc.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* arrayfunc.h -- declarations for miscellaneous array functions in arrayfunc.c */
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/assoc.c b/bash-5.1/assoc.c
index 5782e8567b65e0ff5ff6335fa4b0210bcad44daa..54c96f2503b4d9469c1a6f20a319a35a67f8cc3c 100644
--- a/bash-5.1/assoc.c
+++ b/bash-5.1/assoc.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/*
* assoc.c - functions to manipulate associative arrays
*
diff --git a/bash-5.1/assoc.h b/bash-5.1/assoc.h
index 78ec07386d0576d1f67c76648c3def445c2e0240..7143836f5abb04e118894f1faaf9640bf3342a47 100644
--- a/bash-5.1/assoc.h
+++ b/bash-5.1/assoc.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* assoc.h -- definitions for the interface exported by assoc.c that allows
the rest of the shell to manipulate associative array variables. */
diff --git a/bash-5.1/bashansi.h b/bash-5.1/bashansi.h
index 2c33937d0d5cacfef8fd8cb72a1c32eab2633e86..0010de9595e78b4bb5f61007a72d5650ad14f37c 100644
--- a/bash-5.1/bashansi.h
+++ b/bash-5.1/bashansi.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bashansi.h -- Typically included information required by picky compilers. */
/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/bashhist.c b/bash-5.1/bashhist.c
index 2a05a53fa89d3af3ba250e3523d4545830fe0eaf..4c0247235b64385ef4ecf2a233da05981c892dd4 100644
--- a/bash-5.1/bashhist.c
+++ b/bash-5.1/bashhist.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bashhist.c -- bash interface to the GNU history library. */
/* Copyright (C) 1993-2019 Free Software Foundation, Inc.
diff --git a/bash-5.1/bashhist.h b/bash-5.1/bashhist.h
index 615f5d25692bd5569eeadfa7f494164687668b81..3f71639a40e6dff908b0112b1b6ddd227ce90a8a 100644
--- a/bash-5.1/bashhist.h
+++ b/bash-5.1/bashhist.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bashhist.h -- interface to the bash history functions in bashhist.c. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/bashintl.h b/bash-5.1/bashintl.h
index dd3268331937a7943622a76e168f9ca08dc9d527..90810cbee3657cbaae2717f13ea819e0bd32e6b2 100644
--- a/bash-5.1/bashintl.h
+++ b/bash-5.1/bashintl.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bashintl.h -- Internationalization functions and defines. */
/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/bashjmp.h b/bash-5.1/bashjmp.h
index 8ed1ac47237d71af51272017734db69b785013e0..bfcf102f0def1620f65d65012cea467828754ac1 100644
--- a/bash-5.1/bashjmp.h
+++ b/bash-5.1/bashjmp.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bashjmp.h -- wrapper for setjmp.h with necessary bash definitions. */
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/bashline.c b/bash-5.1/bashline.c
index c69c0c5ee5ccfdb94b97e22a9a432d435e8e0359..fb1f9dd2e0a221f14a984240e92dea6268e29b0c 100644
--- a/bash-5.1/bashline.c
+++ b/bash-5.1/bashline.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bashline.c -- Bash's interface to the readline library. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/bashline.h b/bash-5.1/bashline.h
index 48c9fecfb64bce51c202034673276c0937512cd8..1a4b88b5955a941cb037af92f8e136a405c630b0 100644
--- a/bash-5.1/bashline.h
+++ b/bash-5.1/bashline.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bashline.h -- interface to the bash readline functions in bashline.c. */
/* Copyright (C) 1993-2019 Free Software Foundation, Inc.
diff --git a/bash-5.1/bashtypes.h b/bash-5.1/bashtypes.h
index 01afef4b4df22bbe4cb8bd460fafd01da601625f..33eda19a50bfb0064625f8ba98e9fce878b49c58 100644
--- a/bash-5.1/bashtypes.h
+++ b/bash-5.1/bashtypes.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bashtypes.h -- Bash system types. */
/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/bracecomp.c b/bash-5.1/bracecomp.c
index 2ea8ba971aad9409d48c15ec90f3745a71692cfd..de7c334f47ca9e1fbd8bcdaa2aaa1c7f267f1884 100644
--- a/bash-5.1/bracecomp.c
+++ b/bash-5.1/bracecomp.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* bracecomp.c -- Complete a filename with the possible completions enclosed
in csh-style braces such that the list of completions is available to the
shell. */
diff --git a/bash-5.1/braces.c b/bash-5.1/braces.c
index e91d326ea42d39b3f0cabc9dd0e21d7c597e62a0..8ce540686741291127422f5f0f9e86b9e1a6d408 100644
--- a/bash-5.1/braces.c
+++ b/bash-5.1/braces.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* braces.c -- code for doing word expansion in curly braces. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/builtins.h b/bash-5.1/builtins.h
index 5b7e8116f8df1b414537f09c5b7b79cfa083648f..f57437bbf48615d3dce1cdecd8582bc000249b6c 100644
--- a/bash-5.1/builtins.h
+++ b/bash-5.1/builtins.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* builtins.h -- What a builtin looks like, and where to find them. */
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/builtins/exit.def b/bash-5.1/builtins/exit.def
index d79bcd655b3eab11a0c5d70e9cd2b09bb88f1287..72d9dcb894f638186a59fd4c4348f1f7b92db8f4 100644
--- a/bash-5.1/builtins/exit.def
+++ b/bash-5.1/builtins/exit.def
@@ -58,7 +58,6 @@ int
exit_builtin (list)
WORD_LIST *list;
{
-printf("exit_builtin\n");
r_exit_builtin(list);
CHECK_HELPOPT (list);
diff --git a/bash-5.1/builtins/wait.def b/bash-5.1/builtins/wait.def
index 55e98f37e7467f0fc87cbbde6f0f2105dcc122df..c55204ef08b7a2f24b54d4bd19b9e9195a604912 100644
--- a/bash-5.1/builtins/wait.def
+++ b/bash-5.1/builtins/wait.def
@@ -87,7 +87,7 @@ $END
extern int wait_signal_received;
-procenv_t wait_intr_buf;
+extern procenv_t wait_intr_buf;
int wait_intr_flag;
static int set_waitlist PARAMS((WORD_LIST *));
diff --git a/bash-5.1/builtins_rust/alias/src/lib.rs b/bash-5.1/builtins_rust/alias/src/lib.rs
index 9f0edba003113879dc8374623bf277a6113370c4..ed6eea91d8d859eb777dccc6045fbe5268e6768f 100644
--- a/bash-5.1/builtins_rust/alias/src/lib.rs
+++ b/bash-5.1/builtins_rust/alias/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::ffi::CStr;
//extern crate rcommon;
diff --git a/bash-5.1/builtins_rust/bind/src/lib.rs b/bash-5.1/builtins_rust/bind/src/lib.rs
index 31ee26c5fd55ffad6938611bfc7d5a9f906c0f81..45246a3e4de25f426c884bb403e9f994ab6052ce 100644
--- a/bash-5.1/builtins_rust/bind/src/lib.rs
+++ b/bash-5.1/builtins_rust/bind/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
extern crate rcommon;
diff --git a/bash-5.1/builtins_rust/break_1/src/lib.rs b/bash-5.1/builtins_rust/break_1/src/lib.rs
index 5329c03caca854af1e25dff5e46d05341eeeb642..1b81ba00acb29994253a36efaf8bd539ea74eeb8 100644
--- a/bash-5.1/builtins_rust/break_1/src/lib.rs
+++ b/bash-5.1/builtins_rust/break_1/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
#[macro_use]
#[warn(temporary_cstring_as_ptr)]
extern crate libc;
diff --git a/bash-5.1/builtins_rust/build.rs b/bash-5.1/builtins_rust/build.rs
index f062a48ed003e1a0ba67a7b6713460a7db048766..ef4e40582b2ab1f45428e5ec56fc7ea28c399942 100644
--- a/bash-5.1/builtins_rust/build.rs
+++ b/bash-5.1/builtins_rust/build.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::{env};
diff --git a/bash-5.1/builtins_rust/builtin/src/intercdep.rs b/bash-5.1/builtins_rust/builtin/src/intercdep.rs
index 6882fb9e1540d96c90ae8bec8653090721af66b4..c7accbf57aa4d91e6f7ff0b01a893ffff57e9451 100644
--- a/bash-5.1/builtins_rust/builtin/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/builtin/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE};
diff --git a/bash-5.1/builtins_rust/builtin/src/lib.rs b/bash-5.1/builtins_rust/builtin/src/lib.rs
index 3965d5b02e5fb6906efc52e135c34db533c4051b..c386304a3754241e2f8a23823a9d5f2a91549ca3 100644
--- a/bash-5.1/builtins_rust/builtin/src/lib.rs
+++ b/bash-5.1/builtins_rust/builtin/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_int, c_char};
use std::ffi::CStr;
include!(concat!("intercdep.rs"));
diff --git a/bash-5.1/builtins_rust/caller/src/lib.rs b/bash-5.1/builtins_rust/caller/src/lib.rs
index 1f9369227003c2c71163b091699dde1d9d7aac33..03f9a64c30da77716ddd8aea780ee2d259804808 100644
--- a/bash-5.1/builtins_rust/caller/src/lib.rs
+++ b/bash-5.1/builtins_rust/caller/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate rread;
diff --git a/bash-5.1/builtins_rust/cd/src/lib.rs b/bash-5.1/builtins_rust/cd/src/lib.rs
index ea364e9156c047d2ad00c75cd5d2ec85d71563d4..d36749360275337daed7f970b1f81a6c40cb1632 100644
--- a/bash-5.1/builtins_rust/cd/src/lib.rs
+++ b/bash-5.1/builtins_rust/cd/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE};
diff --git a/bash-5.1/builtins_rust/cmd/src/lib.rs b/bash-5.1/builtins_rust/cmd/src/lib.rs
index 67bb8d767207149218fdd3a85de99f39aa401e9e..bce494c4425883bd9877fc73b27f4b85ee876794 100644
--- a/bash-5.1/builtins_rust/cmd/src/lib.rs
+++ b/bash-5.1/builtins_rust/cmd/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::collections::HashMap;
use std::sync::Mutex;
#[macro_use]
diff --git a/bash-5.1/builtins_rust/colon/src/lib.rs b/bash-5.1/builtins_rust/colon/src/lib.rs
index a5b8ae8be1a1aaf636d48060fafd6428db69023b..24e70d3054a64346beed5052bb29c0c513618895 100644
--- a/bash-5.1/builtins_rust/colon/src/lib.rs
+++ b/bash-5.1/builtins_rust/colon/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::{ffi::CString};
use libc::{size_t, c_int, c_uint, c_char, c_long, c_void, PT_NULL, c_ulong, strchr};
use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE};
diff --git a/bash-5.1/builtins_rust/command/src/lib.rs b/bash-5.1/builtins_rust/command/src/lib.rs
index 16f70b101bf816a11231384304158ed181e6b9f7..c44e1a556d94fccd0ae3d6ee7ff8087faec3fe15 100644
--- a/bash-5.1/builtins_rust/command/src/lib.rs
+++ b/bash-5.1/builtins_rust/command/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::ffi::*;
use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE};
diff --git a/bash-5.1/builtins_rust/common/src/command.rs b/bash-5.1/builtins_rust/common/src/command.rs
index c8ce39e329ae27b0f55da7e6e5b83f2a2ac89fed..f9d61fd5d22cdc27d2dd8148aecb51136eb0aa47 100644
--- a/bash-5.1/builtins_rust/common/src/command.rs
+++ b/bash-5.1/builtins_rust/common/src/command.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
#[macro_export]
macro_rules! SUBSHELL_PAREN {
diff --git a/bash-5.1/builtins_rust/common/src/lib.rs b/bash-5.1/builtins_rust/common/src/lib.rs
index b6ad3c98df16b571415dbdebdf66cefe16ba5aee..b7b39842e3ec8ccc972c410ac7c50078b2e08c41 100644
--- a/bash-5.1/builtins_rust/common/src/lib.rs
+++ b/bash-5.1/builtins_rust/common/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
use libc::{c_char,c_int, c_void, FILE, size_t, intmax_t,c_long, strcmp};
diff --git a/bash-5.1/builtins_rust/common/src/shell.rs b/bash-5.1/builtins_rust/common/src/shell.rs
index a0a380b93210b6045aef3577fa334a19763f25cb..e744100fbe14c704fbf44bd9cc9c0566b6368896 100644
--- a/bash-5.1/builtins_rust/common/src/shell.rs
+++ b/bash-5.1/builtins_rust/common/src/shell.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
pub static EX_BADUSAGE:i32 = 2;
pub static EX_MISCERROR:i32 = 2;
diff --git a/bash-5.1/builtins_rust/complete/src/lib.rs b/bash-5.1/builtins_rust/complete/src/lib.rs
index 092c17145604ebdfd0f286d96718da9e08269309..74a8d9e1f8be1712a83eba5c1ff44b30192a185d 100644
--- a/bash-5.1/builtins_rust/complete/src/lib.rs
+++ b/bash-5.1/builtins_rust/complete/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/declare/src/lib.rs b/bash-5.1/builtins_rust/declare/src/lib.rs
index dcc5beb7f57bd1e29e193a85de1bfb88aa33e0aa..cf16162bc5be4cfd8930f0810c5795a8823cc99d 100644
--- a/bash-5.1/builtins_rust/declare/src/lib.rs
+++ b/bash-5.1/builtins_rust/declare/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/echo/src/lib.rs b/bash-5.1/builtins_rust/echo/src/lib.rs
index ac3446bf0b2ee7e99e154ea1d55052092e31b291..fc9b8bcc5c3882caffeccc5d64814eaed50d7969 100644
--- a/bash-5.1/builtins_rust/echo/src/lib.rs
+++ b/bash-5.1/builtins_rust/echo/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
use libc::{c_char,c_int, strchr, putchar,clearerr,free,FILE, fprintf, c_void};
diff --git a/bash-5.1/builtins_rust/enable/src/lib.rs b/bash-5.1/builtins_rust/enable/src/lib.rs
index b0386c96e295307795a7be07f3fe4794ff269e64..be00f19fb6035208d7dd7f1febf1232919bc1781 100644
--- a/bash-5.1/builtins_rust/enable/src/lib.rs
+++ b/bash-5.1/builtins_rust/enable/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::ffi::{CString,CStr};
extern crate rcmd;
use libc::c_char;
diff --git a/bash-5.1/builtins_rust/eval/src/lib.rs b/bash-5.1/builtins_rust/eval/src/lib.rs
index da559eaf9e210219df335b43b3546179f0fa6d73..bde54e670598a6e569c7f56ae70be810f3b1f3ef 100644
--- a/bash-5.1/builtins_rust/eval/src/lib.rs
+++ b/bash-5.1/builtins_rust/eval/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate rcommon;
diff --git a/bash-5.1/builtins_rust/exec/src/lib.rs b/bash-5.1/builtins_rust/exec/src/lib.rs
index 32a59f0a9011ebbb94308fbe41ee8ba3cb8a8afd..cf21ea48a733e0b08fbb091742abce27da78a3ef 100644
--- a/bash-5.1/builtins_rust/exec/src/lib.rs
+++ b/bash-5.1/builtins_rust/exec/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
extern crate rcommon;
diff --git a/bash-5.1/builtins_rust/exec_cmd/src/lib.rs b/bash-5.1/builtins_rust/exec_cmd/src/lib.rs
index 3541d011fbf9549b0cd5acb6593ab7a853fc2faa..f22160e5e5d73b9ecf0f31326441fdfc558079ae 100644
--- a/bash-5.1/builtins_rust/exec_cmd/src/lib.rs
+++ b/bash-5.1/builtins_rust/exec_cmd/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::WordList;
use ralias::{r_alias_builtin,r_unalias_builtin};
use rbind::r_bind_builtin;
diff --git a/bash-5.1/builtins_rust/exit/src/lib.rs b/bash-5.1/builtins_rust/exit/src/lib.rs
index dea448f484785ec1d1817ff5f728b9fb156f492f..1f0c5d96ab2c3ec4b967dcfa0798810af9e39e45 100644
--- a/bash-5.1/builtins_rust/exit/src/lib.rs
+++ b/bash-5.1/builtins_rust/exit/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate rjobs;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/fc/src/lib.rs b/bash-5.1/builtins_rust/fc/src/lib.rs
index 2d685a99ddc3cda01d4f256fd05d21da210e5ea1..4b1daf2e03b12a39555224b1055bea9f262c8c3a 100644
--- a/bash-5.1/builtins_rust/fc/src/lib.rs
+++ b/bash-5.1/builtins_rust/fc/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/fg_bg/src/lib.rs b/bash-5.1/builtins_rust/fg_bg/src/lib.rs
index b81128cf9643db78e24d61903b04e4e37692ab02..f47ae236a7ecac2a2738f4a4d3d2e3fc02207c95 100644
--- a/bash-5.1/builtins_rust/fg_bg/src/lib.rs
+++ b/bash-5.1/builtins_rust/fg_bg/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/getopts/src/lib.rs b/bash-5.1/builtins_rust/getopts/src/lib.rs
index 25373fbc799da47051d7ffca3311097370520c35..91eda74803adb60cd5a6b2eda9cb473c54efa33f 100644
--- a/bash-5.1/builtins_rust/getopts/src/lib.rs
+++ b/bash-5.1/builtins_rust/getopts/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE,GETOPT_HELP, r_builtin_usage};
diff --git a/bash-5.1/builtins_rust/hash/src/lib.rs b/bash-5.1/builtins_rust/hash/src/lib.rs
index 4918236f57b4cf6d0cafa768700c3c3651496ce8..769cde8c78dd2c8ff3d7eb1c98cfbd73f9175fd2 100644
--- a/bash-5.1/builtins_rust/hash/src/lib.rs
+++ b/bash-5.1/builtins_rust/hash/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate rread;
diff --git a/bash-5.1/builtins_rust/help/src/lib.rs b/bash-5.1/builtins_rust/help/src/lib.rs
index 9647bbc07bae4084169f06a59ca11759efde72eb..847fa1803682473753c5299b7a745c4ffd06e1c4 100644
--- a/bash-5.1/builtins_rust/help/src/lib.rs
+++ b/bash-5.1/builtins_rust/help/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
extern crate std;
diff --git a/bash-5.1/builtins_rust/history/src/intercdep.rs b/bash-5.1/builtins_rust/history/src/intercdep.rs
index e284a89d5438ad809f3499f58391ca934f32779b..c7c1e0bac09dcae542a2e428685cdc65d20d371d 100644
--- a/bash-5.1/builtins_rust/history/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/history/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
// #[repr(C)]
// #[derive(Copy, Clone)]
diff --git a/bash-5.1/builtins_rust/history/src/lib.rs b/bash-5.1/builtins_rust/history/src/lib.rs
index e1d9fd7d3f02b2773b9cc6c0897124354d6c5659..acc108a465cbea4b72ab25e896da0e53071b5f76 100644
--- a/bash-5.1/builtins_rust/history/src/lib.rs
+++ b/bash-5.1/builtins_rust/history/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::{ffi::{CString, CStr}, io::Write};
use libc::{size_t, c_int, c_char, c_long, c_void, PT_NULL};
@@ -328,8 +331,10 @@ unsafe {
builtin_error( c_err.as_ptr(), (*((*list).word)).word);
result = EXECUTION_FAILURE;
} else {
- std::io::stdout().lock().write_all(CStr::from_ptr(s).to_bytes()).unwrap();
- libc::putchar(b'\n' as c_int);
+ println!("{}",CStr::from_ptr(s).to_str().unwrap());
+ //println!("{}",String::from(CStr::from_ptr(s).to_str().unwrap()));
+ //std::io::stdout().lock().write_all(CStr::from_ptr(s).to_bytes()).unwrap();
+ //libc::putchar(b'\n' as c_int);
}
if !s.is_null() {
libc::free(s as *mut c_void);
diff --git a/bash-5.1/builtins_rust/jobs/src/lib.rs b/bash-5.1/builtins_rust/jobs/src/lib.rs
index ec27930edda5d0baa0902143060f2a2417b54e63..cc0ee93fb01c9b312eefffa6584c82ebc12519a9 100644
--- a/bash-5.1/builtins_rust/jobs/src/lib.rs
+++ b/bash-5.1/builtins_rust/jobs/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/kill/src/intercdep.rs b/bash-5.1/builtins_rust/kill/src/intercdep.rs
index 3e4b4e2894614b3b790796bb97eaae910b037736..b12fb0f3f8864a469b797baeb9aa322b8fc04161 100644
--- a/bash-5.1/builtins_rust/kill/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/kill/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::{r_builtin_usage,r_sh_invalidsig,r_sh_badpid,r_sh_badjob,r_get_job_spec,r_display_signal_list,WordList,WordDesc,err_translate_fn};
use rhelp::r_builtin_help;
// #[repr(C)]
diff --git a/bash-5.1/builtins_rust/kill/src/lib.rs b/bash-5.1/builtins_rust/kill/src/lib.rs
index 55ccb21ce1c0d414da2066c10747d8f0b55ba0e5..a7f31794a3a9a8b6272454a84553307b142f2f9f 100644
--- a/bash-5.1/builtins_rust/kill/src/lib.rs
+++ b/bash-5.1/builtins_rust/kill/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::{ffi::{CString, CStr}};
use libc::{c_int, c_uint, c_char, c_long, c_void, PT_NULL};
diff --git a/bash-5.1/builtins_rust/mapfile/src/intercdep.rs b/bash-5.1/builtins_rust/mapfile/src/intercdep.rs
index f893afc1463737da300b31f1cc1b86ed37431210..e31215a740676bc956c65a439acba66492b6e20f 100644
--- a/bash-5.1/builtins_rust/mapfile/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/mapfile/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::{WordList};
use rhelp::r_builtin_help;
pub type arrayind_t = c_long;
diff --git a/bash-5.1/builtins_rust/mapfile/src/lib.rs b/bash-5.1/builtins_rust/mapfile/src/lib.rs
index 31979bbe1f009029d76dc3358969c5ba9b6cc63c..5c8d9393255e3aef401324caeeefcde1db4921d8 100644
--- a/bash-5.1/builtins_rust/mapfile/src/lib.rs
+++ b/bash-5.1/builtins_rust/mapfile/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::{ffi::CString};
use libc::{size_t, ssize_t, c_int, c_uint, c_char, c_uchar, c_long, c_void, PT_NULL};
diff --git a/bash-5.1/builtins_rust/printf/src/intercdep.rs b/bash-5.1/builtins_rust/printf/src/intercdep.rs
index d0016ee85f801131ec4d4eafbdb98e6c88548e6d..796d2ac0e5159ae9d89821db9776bb6810573f22 100644
--- a/bash-5.1/builtins_rust/printf/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/printf/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::{WordList};
use rhelp::r_builtin_help;
pub type __intmax_t = c_long;
diff --git a/bash-5.1/builtins_rust/printf/src/lib.rs b/bash-5.1/builtins_rust/printf/src/lib.rs
index d3cc5dc3f3677983cdead9dce5d37655d2846757..c6a9c6c839acd2d5a46dd5b67ba484524a4e3ca8 100644
--- a/bash-5.1/builtins_rust/printf/src/lib.rs
+++ b/bash-5.1/builtins_rust/printf/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::ffi::CStr;
use std::{ffi::CString};
use libc::{size_t, c_int, c_uint, c_char, c_long, c_void, PT_NULL, c_ulong, strchr, };
diff --git a/bash-5.1/builtins_rust/pushd/src/lib.rs b/bash-5.1/builtins_rust/pushd/src/lib.rs
index c8895b55969387a384c6e5b1c2dbb34efadc633b..f3caec293bdd52f869f371dedb22c881731250f6 100644
--- a/bash-5.1/builtins_rust/pushd/src/lib.rs
+++ b/bash-5.1/builtins_rust/pushd/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/read/src/intercdep.rs b/bash-5.1/builtins_rust/read/src/intercdep.rs
index 3229d8237c521ba772ac7dbaa2af0907e381f14c..fd31529edbd535251e76bc403beac2411662e34e 100644
--- a/bash-5.1/builtins_rust/read/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/read/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::{r_builtin_usage,r_sh_invalidid,r_builtin_bind_variable,WordList,WordDesc};
pub type SHELL_VAR = rcommon::SHELL_VAR;
use rhelp::r_builtin_help;
diff --git a/bash-5.1/builtins_rust/read/src/lib.rs b/bash-5.1/builtins_rust/read/src/lib.rs
index 87fd91257044e93cde37446258815e4c397a98a1..627d34a2debca4da5322942a3c729d0a6ef2c0d8 100644
--- a/bash-5.1/builtins_rust/read/src/lib.rs
+++ b/bash-5.1/builtins_rust/read/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_int, c_char, c_long, c_ulong, c_uint, size_t, c_void, PT_NULL, ssize_t};
use nix::errno::errno;
use std::{ffi::{CString, CStr}, ptr::null_mut,};
diff --git a/bash-5.1/builtins_rust/rlet/src/intercdep.rs b/bash-5.1/builtins_rust/rlet/src/intercdep.rs
index f56273d89339b83c453dea5bc355a6a082c0e5fb..748513985d7016d4fbe0dfd09f596ad5edc287d0 100644
--- a/bash-5.1/builtins_rust/rlet/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/rlet/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::{WordList,err_translate_fn};
use rhelp::r_builtin_help;
pub const EXECUTION_SUCCESS : c_int = 0;
diff --git a/bash-5.1/builtins_rust/rlet/src/lib.rs b/bash-5.1/builtins_rust/rlet/src/lib.rs
index 588db67634f4eef32eed4ea7ffab4f3f8513a3ab..20799dc1ad9ce09162e0825808e35ed893a25ae8 100644
--- a/bash-5.1/builtins_rust/rlet/src/lib.rs
+++ b/bash-5.1/builtins_rust/rlet/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::ffi::CStr;
use libc::{c_int, c_char, c_long, c_void};
diff --git a/bash-5.1/builtins_rust/rreturn/src/intercdep.rs b/bash-5.1/builtins_rust/rreturn/src/intercdep.rs
index 0ca17eb89a1692b02ae60af0768e7f0affdfaf22..5ec57999691bac1485ed0d75a1f1fadecaa22eaa 100644
--- a/bash-5.1/builtins_rust/rreturn/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/rreturn/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
// #[repr(C)]
// #[derive(Copy, Clone)]
diff --git a/bash-5.1/builtins_rust/rreturn/src/lib.rs b/bash-5.1/builtins_rust/rreturn/src/lib.rs
index b9ca0f45daf22f5424eca37f1fe66058c565a643..09ab272d20ea70916b7049989043526dbf3aad0d 100644
--- a/bash-5.1/builtins_rust/rreturn/src/lib.rs
+++ b/bash-5.1/builtins_rust/rreturn/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_int, c_char, c_long, c_ulong};
use rcommon::{r_get_exitstat,WordList};
include!(concat!("intercdep.rs"));
diff --git a/bash-5.1/builtins_rust/set/src/lib.rs b/bash-5.1/builtins_rust/set/src/lib.rs
index 8e5851056d42358c601a0e054dfcf9bcbb6f0c36..ee9ee4299c30e2e2660fbc5f6392331e5817a3a8 100644
--- a/bash-5.1/builtins_rust/set/src/lib.rs
+++ b/bash-5.1/builtins_rust/set/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/setattr/src/intercdep.rs b/bash-5.1/builtins_rust/setattr/src/intercdep.rs
index b5322b50eb3b5ff26cb27dff279bd049ad96c78c..a878950a6a8f078fdfe54d51b97fe48c0ccdd10d 100644
--- a/bash-5.1/builtins_rust/setattr/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/setattr/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::{WordList};
use rread::{ARRAY};
#[repr(C)]
diff --git a/bash-5.1/builtins_rust/setattr/src/lib.rs b/bash-5.1/builtins_rust/setattr/src/lib.rs
index b38667662d4acd5241e52bbce0c11113af09e474..9f85d129e2a3a11fb10aa46cc53d5aa9c54bceff 100644
--- a/bash-5.1/builtins_rust/setattr/src/lib.rs
+++ b/bash-5.1/builtins_rust/setattr/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::mem::size_of_val;
use libc::{c_int, c_uint, c_char, c_long, PT_NULL, c_void};
diff --git a/bash-5.1/builtins_rust/shift/src/intercdep.rs b/bash-5.1/builtins_rust/shift/src/intercdep.rs
index 5ea7ff657c0a793c9d5dae8935d4d9212b07345f..105e04a50284904f9a756317cae64219d7bba05e 100644
--- a/bash-5.1/builtins_rust/shift/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/shift/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::{WordList};
pub const EXECUTION_SUCCESS : c_int = 0;
diff --git a/bash-5.1/builtins_rust/shift/src/lib.rs b/bash-5.1/builtins_rust/shift/src/lib.rs
index affc5e7945e44ab353d3f072baaaab6211d20763..8622e4ee0381263a973cc06e9053f60b4eb717e1 100644
--- a/bash-5.1/builtins_rust/shift/src/lib.rs
+++ b/bash-5.1/builtins_rust/shift/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_int, c_char, c_long, PT_NULL};
use rcommon::{r_sh_erange,};
use rhelp::r_builtin_help;
diff --git a/bash-5.1/builtins_rust/shopt/src/lib.rs b/bash-5.1/builtins_rust/shopt/src/lib.rs
index 4642964d8b54b73395b8f5958ddb586a92beada5..12734e366c01064dfb4f19b6a504bb6e43a76cd0 100644
--- a/bash-5.1/builtins_rust/shopt/src/lib.rs
+++ b/bash-5.1/builtins_rust/shopt/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate rcommon;
use std::ffi::*;
use rset::r_set_shellopts;
diff --git a/bash-5.1/builtins_rust/source/src/lib.rs b/bash-5.1/builtins_rust/source/src/lib.rs
index 2ec10a5ffc3e2020aec5c18fb5cc5ae297defde3..4c726b650e3c4d8283520d00d872d7142cd0511c 100644
--- a/bash-5.1/builtins_rust/source/src/lib.rs
+++ b/bash-5.1/builtins_rust/source/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/suspend/src/intercdep.rs b/bash-5.1/builtins_rust/suspend/src/intercdep.rs
index a8d982543ec567b1da1bf122b2f919f463da1f52..c00397f00dd27cc5acd315fd9efc19fb455d9d89 100644
--- a/bash-5.1/builtins_rust/suspend/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/suspend/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
// #[repr(C)]
// #[derive(Copy, Clone)]
diff --git a/bash-5.1/builtins_rust/suspend/src/lib.rs b/bash-5.1/builtins_rust/suspend/src/lib.rs
index 182dcaadd9cef6eb0f7feca3e53936f625dd3fba..272065d7ec04ce35ef82d711ab6659862f4d246a 100644
--- a/bash-5.1/builtins_rust/suspend/src/lib.rs
+++ b/bash-5.1/builtins_rust/suspend/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_int, c_char, c_long, PT_NULL};
use rcommon::{r_no_args,WordList,r_builtin_usage};
use rhelp::r_builtin_help;
diff --git a/bash-5.1/builtins_rust/test/src/intercdep.rs b/bash-5.1/builtins_rust/test/src/intercdep.rs
index 8b4b7da3d2710301590df6cff54a7611f93c5bf1..c487701c814e6a20812a5613fdce360cbd4a954a 100644
--- a/bash-5.1/builtins_rust/test/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/test/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
// #[repr(C)]
// #[derive(Copy, Clone)]
diff --git a/bash-5.1/builtins_rust/test/src/lib.rs b/bash-5.1/builtins_rust/test/src/lib.rs
index fa3907670aacd06be5016b037f50e5c2b0b46ea8..bc6d40ef4b6abf7527665915baf6999e0cb4e40c 100644
--- a/bash-5.1/builtins_rust/test/src/lib.rs
+++ b/bash-5.1/builtins_rust/test/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_int, c_char, c_void};
use std::ffi::{CStr, CString};
use rcommon::{r_make_builtin_argv,WordList};
diff --git a/bash-5.1/builtins_rust/times/src/intercdep.rs b/bash-5.1/builtins_rust/times/src/intercdep.rs
index c2f5d3213ba44c8fff14c155c067b46939b25667..192de07134076df49f0171e822b3ba7c5962ca0e 100644
--- a/bash-5.1/builtins_rust/times/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/times/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use rcommon::WordList;
pub const EXECUTION_SUCCESS : c_int = 0;
diff --git a/bash-5.1/builtins_rust/times/src/lib.rs b/bash-5.1/builtins_rust/times/src/lib.rs
index c5da312649da4549d4cd803223876eac278665a4..38eed28980943908729e3fe2554b3b78a461ebe9 100644
--- a/bash-5.1/builtins_rust/times/src/lib.rs
+++ b/bash-5.1/builtins_rust/times/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_int, c_char};
use rcommon::{r_sh_chkwrite};
include!(concat!("intercdep.rs"));
diff --git a/bash-5.1/builtins_rust/trap/src/intercdep.rs b/bash-5.1/builtins_rust/trap/src/intercdep.rs
index 93e2d8a223feb297a4e278da59047ffc6a3aaf4d..eac957f1aac373ac6397bbe76d0628d7bc6b5ed6 100644
--- a/bash-5.1/builtins_rust/trap/src/intercdep.rs
+++ b/bash-5.1/builtins_rust/trap/src/intercdep.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
// #[repr(C)]
// #[derive(Copy, Clone)]
diff --git a/bash-5.1/builtins_rust/trap/src/lib.rs b/bash-5.1/builtins_rust/trap/src/lib.rs
index 93598c2449b5116ff3c6540b9c55346cd30c1e12..4bb47528da36b9a98e89f9d19d00eb856143fe81 100644
--- a/bash-5.1/builtins_rust/trap/src/lib.rs
+++ b/bash-5.1/builtins_rust/trap/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use std::{ffi::CString};
use libc::{c_int, c_char, c_void, PT_NULL};
diff --git a/bash-5.1/builtins_rust/type/src/lib.rs b/bash-5.1/builtins_rust/type/src/lib.rs
index f18442068e80d362ad210b2dd0a42329f0351e7a..be74225bd818649b9c855c150c4733680c0f6c90 100644
--- a/bash-5.1/builtins_rust/type/src/lib.rs
+++ b/bash-5.1/builtins_rust/type/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/ulimit/src/lib.rs b/bash-5.1/builtins_rust/ulimit/src/lib.rs
index 7d548c0b0c433d8856dcc4dae27c8cf658f27497..bfc018164c9ed2d56528676f5070733a33ce71e8 100644
--- a/bash-5.1/builtins_rust/ulimit/src/lib.rs
+++ b/bash-5.1/builtins_rust/ulimit/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate nix;
diff --git a/bash-5.1/builtins_rust/umask/src/lib.rs b/bash-5.1/builtins_rust/umask/src/lib.rs
index 3f5238500b9c239e8aeaec54c34e083d4cde7f2e..2ca353dec5c0a9a0e977449d390f216fc0e8ce94 100644
--- a/bash-5.1/builtins_rust/umask/src/lib.rs
+++ b/bash-5.1/builtins_rust/umask/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
use libc::{c_char,c_int};
diff --git a/bash-5.1/builtins_rust/wait/src/lib.rs b/bash-5.1/builtins_rust/wait/src/lib.rs
index 03f1a9c93c9f4bd6b3e5a202c3158e590d175718..32b5eb80e0add5198237bceb24af2126781bee49 100644
--- a/bash-5.1/builtins_rust/wait/src/lib.rs
+++ b/bash-5.1/builtins_rust/wait/src/lib.rs
@@ -1,16 +1,36 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
extern crate libc;
extern crate rjobs;
extern crate rread;
extern crate nix;
-use libc::{c_char, intmax_t, pid_t, c_short,c_int, SIGCHLD, c_long};
-use std::ffi::{CString,};
-use nix::sys::signal::{SigSet};
+include!("./signal.rs");
+
+pub type __jmp_buf = [::std::os::raw::c_long; 8usize];
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __jmp_buf_tag {
+ pub __jmpbuf: __jmp_buf,
+ pub __mask_was_saved: ::std::os::raw::c_int,
+ pub __saved_mask: __sigset_t,
+}
+extern "C" {
+ pub fn setjmp(__env: *mut __jmp_buf_tag) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn __sigsetjmp(
+ __env: *mut __jmp_buf_tag,
+ __savemask: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+use libc::{c_ulong, c_char, intmax_t, c_short,c_int, c_long};
+use std::ffi::{CString,};
+use nix::sys::signal::{SigSet, Signal};
use rjobs::{PROCESS,COMMAND, BLOCK_CHILD, UNBLOCK_CHILD};
-// use rjobs::WordList;
-use rread::{SHELL_VAR,sh_var_value_func_t,sh_var_assign_func_t,
- sigjmp_buf,__jmp_buf_tag,__sigset_t,__sigsetjmp,};
+use rread::{SHELL_VAR, sh_var_value_func_t, sh_var_assign_func_t};
use rcommon::{r_builtin_unbind_variable,r_builtin_usage,r_get_job_spec,WordList};
use rcommon::{ WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN};
@@ -34,6 +54,7 @@ pub struct JOB {
cleanarg:* mut fn()
}
+
#[repr(C)]
pub struct jobstats {
/* limits */
@@ -162,28 +183,13 @@ macro_rules! UNBLOCK_SIGNAL {
};
}
-#[macro_export]
-macro_rules! sigsetjmp {
- ($env:expr,$savemask:expr) => {
- unsafe{
- __sigsetjmp($env,$savemask)
- }
-
- };
-}
-
-#[macro_export]
-macro_rules! setjmp_sigs {
- ($x:expr) => {
- sigsetjmp!(($x),1)
- };
-}
+pub type procenv_t=__jmp_buf_tag;
-pub type procenv_t=sigjmp_buf;
//C库
extern "C" {
+ static mut wait_intr_buf: procenv_t;
static mut wait_signal_received:i32;
- // static mut wait_intr_flag:i32;
+ static mut wait_intr_flag:i32;
static mut loptend:*mut WordList;
static js:jobstats ;
static mut jobs:*mut*mut JOB;
@@ -191,18 +197,14 @@ extern "C" {
static assoc_expand_once:i32;
static mut last_command_exit_signal:i32;
static posixly_correct:i32;
- // fn sigsetjmp(env:sigjmp_buf,val:c_int)->i32;
fn internal_getopt (list:*mut WordList, opts:*mut c_char)->i32;
- // fn builtin_usage();
fn legal_number(string:*const c_char,result:*mut c_long)->i32;
fn get_job_by_pid(pid:pid_t,block:i32,procp:*mut *mut PROCESS)->i32;
- // fn get_job_spec(list:*mut WordList)->i32;
fn sh_badjob(str:*mut c_char);
fn reset_internal_getopt();
fn legal_identifier(name:*const c_char)->i32;
fn valid_array_reference(name:*const c_char,flage:i32)->i32;
fn sh_invalidid(s:*mut c_char);
- // fn builtin_unbind_variable(name:*const c_char)->i32;
fn wait_sigint_cleanup();
fn first_pending_trap()->i32;
fn next_pending_trap(start:i32)->i32;
@@ -223,19 +225,11 @@ macro_rules! WAIT_RETURN {
{
wait_signal_received = 0;
wait_intr_flag = 0;
-
$s
- }
+ }
};
}
-pub static mut wait_intr_flag:i32=0;
-pub static mut wait_intr_buf:procenv_t = [__jmp_buf_tag{
- __jmpbuf:[0;8],
- __mask_was_saved:0,
- __saved_mask:__sigset_t{__val:[0;16]},
-}; 1];
-
//rust
#[no_mangle]
pub extern "C" fn r_wait_builtin(mut list:*mut WordList)->i32{
@@ -279,15 +273,14 @@ pub extern "C" fn r_wait_builtin(mut list:*mut WordList)->i32{
}
r_builtin_usage();
return EX_USAGE;
- }
+ }
}
-
}
list = loptend;
/* Sanity-check variable name if -p supplied. */
- if vname != std::ptr::null_mut(){
-
+ if vname != std::ptr::null_mut(){
+
//这里有个条件编译,确定是否需要
let arrayflags:i32;
if assoc_expand_once != 0{
@@ -316,7 +309,8 @@ pub extern "C" fn r_wait_builtin(mut list:*mut WordList)->i32{
specially (I think), since it's handled specially in {no,}jobs.c. */
wait_intr_flag = 1;
- code = setjmp_sigs!(&mut wait_intr_buf[0]);
+
+ code = __sigsetjmp(&mut wait_intr_buf, 1);//*mut [__jmp_buf_tag; 1]
if code != 0{
last_command_exit_signal = wait_signal_received;
@@ -332,8 +326,8 @@ pub extern "C" fn r_wait_builtin(mut list:*mut WordList)->i32{
/* We special case SIGCHLD when not in posix mode because we don't break
out of the wait even when the signal is trapped; we run the trap after
the wait completes. See how it's handled in jobs.c:waitchld(). */
-
- if opt==SIGCHLD && posixly_correct==0{
+
+ if opt==(SIGCHLD as i32) && posixly_correct==0{
opt = next_pending_trap(opt+1);
}
if opt != -1{
diff --git a/bash-5.1/builtins_rust/wait/src/signal.rs b/bash-5.1/builtins_rust/wait/src/signal.rs
new file mode 100644
index 0000000000000000000000000000000000000000..ac59eadcff9ed7c5ec9a72af797033f9c1264b5a
--- /dev/null
+++ b/bash-5.1/builtins_rust/wait/src/signal.rs
@@ -0,0 +1,868 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
+/* automatically generated by rust-bindgen */
+
+pub const _FEATURES_H: u32 = 1;
+pub const _DEFAULT_SOURCE: u32 = 1;
+pub const __USE_ISOC11: u32 = 1;
+pub const __USE_ISOC99: u32 = 1;
+pub const __USE_ISOC95: u32 = 1;
+pub const __USE_POSIX_IMPLICITLY: u32 = 1;
+pub const _POSIX_SOURCE: u32 = 1;
+pub const _POSIX_C_SOURCE: u32 = 200809;
+pub const __USE_POSIX: u32 = 1;
+pub const __USE_POSIX2: u32 = 1;
+pub const __USE_POSIX199309: u32 = 1;
+pub const __USE_POSIX199506: u32 = 1;
+pub const __USE_XOPEN2K: u32 = 1;
+pub const __USE_XOPEN2K8: u32 = 1;
+pub const _ATFILE_SOURCE: u32 = 1;
+pub const __USE_MISC: u32 = 1;
+pub const __USE_ATFILE: u32 = 1;
+pub const __USE_FORTIFY_LEVEL: u32 = 0;
+pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
+pub const _STDC_PREDEF_H: u32 = 1;
+pub const __STDC_IEC_559__: u32 = 1;
+pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
+pub const __STDC_ISO_10646__: u32 = 201706;
+pub const __GNU_LIBRARY__: u32 = 6;
+pub const __GLIBC__: u32 = 2;
+pub const __GLIBC_MINOR__: u32 = 28;
+pub const _SYS_CDEFS_H: u32 = 1;
+pub const __glibc_c99_flexarr_available: u32 = 1;
+pub const __WORDSIZE: u32 = 64;
+pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
+pub const __SYSCALL_WORDSIZE: u32 = 64;
+pub const __HAVE_GENERIC_SELECTION: u32 = 1;
+pub const _BITS_TYPES_H: u32 = 1;
+pub const _BITS_TYPESIZES_H: u32 = 1;
+pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
+pub const __INO_T_MATCHES_INO64_T: u32 = 1;
+pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
+pub const __FD_SETSIZE: u32 = 1024;
+pub const _BITS_SIGNUM_H: u32 = 1;
+pub const _BITS_SIGNUM_GENERIC_H: u32 = 1;
+pub const SIGINT: u32 = 2;
+pub const SIGILL: u32 = 4;
+pub const SIGABRT: u32 = 6;
+pub const SIGFPE: u32 = 8;
+pub const SIGSEGV: u32 = 11;
+pub const SIGTERM: u32 = 15;
+pub const SIGHUP: u32 = 1;
+pub const SIGQUIT: u32 = 3;
+pub const SIGTRAP: u32 = 5;
+pub const SIGKILL: u32 = 9;
+pub const SIGBUS: u32 = 10;
+pub const SIGSYS: u32 = 12;
+pub const SIGPIPE: u32 = 13;
+pub const SIGALRM: u32 = 14;
+pub const SIGURG: u32 = 16;
+pub const SIGSTOP: u32 = 17;
+pub const SIGTSTP: u32 = 18;
+pub const SIGCONT: u32 = 19;
+pub const SIGCHLD: u32 = 20;
+pub const SIGTTIN: u32 = 21;
+pub const SIGTTOU: u32 = 22;
+pub const SIGPOLL: u32 = 23;
+pub const SIGXCPU: u32 = 24;
+pub const SIGXFSZ: u32 = 25;
+pub const SIGVTALRM: u32 = 26;
+pub const SIGPROF: u32 = 27;
+pub const SIGUSR1: u32 = 30;
+pub const SIGUSR2: u32 = 31;
+pub const SIGWINCH: u32 = 28;
+pub const SIGIO: u32 = 23;
+pub const SIGIOT: u32 = 6;
+pub const SIGCLD: u32 = 20;
+pub const __SIGRTMIN: u32 = 32;
+pub const __SIGRTMAX: u32 = 32;
+pub const _NSIG: u32 = 33;
+pub const SIGSTKFLT: u32 = 16;
+pub const SIGPWR: u32 = 30;
+pub const __sig_atomic_t_defined: u32 = 1;
+pub const __sigset_t_defined: u32 = 1;
+pub const _STRUCT_TIMESPEC: u32 = 1;
+pub const __siginfo_t_defined: u32 = 1;
+pub const __SI_MAX_SIZE: u32 = 128;
+pub const _BITS_SIGINFO_ARCH_H: u32 = 1;
+pub const __SI_ERRNO_THEN_CODE: u32 = 1;
+pub const __SI_HAVE_SIGSYS: u32 = 1;
+pub const _BITS_SIGINFO_CONSTS_H: u32 = 1;
+pub const __SI_ASYNCIO_AFTER_SIGIO: u32 = 1;
+pub const __sigevent_t_defined: u32 = 1;
+pub const __SIGEV_MAX_SIZE: u32 = 64;
+pub const __have_pthread_attr_t: u32 = 1;
+pub const _BITS_SIGEVENT_CONSTS_H: u32 = 1;
+pub const NSIG: u32 = 33;
+pub const _BITS_SIGACTION_H: u32 = 1;
+pub const SA_NOCLDSTOP: u32 = 1;
+pub const SA_NOCLDWAIT: u32 = 2;
+pub const SA_SIGINFO: u32 = 4;
+pub const SA_ONSTACK: u32 = 134217728;
+pub const SA_RESTART: u32 = 268435456;
+pub const SA_NODEFER: u32 = 1073741824;
+pub const SA_RESETHAND: u32 = 2147483648;
+pub const SA_INTERRUPT: u32 = 536870912;
+pub const SA_NOMASK: u32 = 1073741824;
+pub const SA_ONESHOT: u32 = 2147483648;
+pub const SA_STACK: u32 = 134217728;
+pub const SIG_BLOCK: u32 = 0;
+pub const SIG_UNBLOCK: u32 = 1;
+pub const SIG_SETMASK: u32 = 2;
+pub const _BITS_SIGCONTEXT_H: u32 = 1;
+pub const FP_XSTATE_MAGIC1: u32 = 1179670611;
+pub const FP_XSTATE_MAGIC2: u32 = 1179670597;
+pub const __stack_t_defined: u32 = 1;
+pub const _SYS_UCONTEXT_H: u32 = 1;
+pub const __NGREG: u32 = 23;
+pub const NGREG: u32 = 23;
+pub const _BITS_SIGSTACK_H: u32 = 1;
+pub const MINSIGSTKSZ: u32 = 2048;
+pub const SIGSTKSZ: u32 = 8192;
+pub const _BITS_SS_FLAGS_H: u32 = 1;
+pub const __sigstack_defined: u32 = 1;
+pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
+pub const _THREAD_SHARED_TYPES_H: u32 = 1;
+pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
+pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
+pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
+pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
+pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
+pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
+pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
+pub const __PTHREAD_MUTEX_LOCK_ELISION: u32 = 1;
+pub const __PTHREAD_MUTEX_NUSERS_AFTER_KIND: u32 = 0;
+pub const __PTHREAD_MUTEX_USE_UNION: u32 = 0;
+pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: u32 = 1;
+pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
+pub const _BITS_SIGTHREAD_H: u32 = 1;
+pub type __u_char = ::std::os::raw::c_uchar;
+pub type __u_short = ::std::os::raw::c_ushort;
+pub type __u_int = ::std::os::raw::c_uint;
+pub type __u_long = ::std::os::raw::c_ulong;
+pub type __int8_t = ::std::os::raw::c_schar;
+pub type __uint8_t = ::std::os::raw::c_uchar;
+pub type __int16_t = ::std::os::raw::c_short;
+pub type __uint16_t = ::std::os::raw::c_ushort;
+pub type __int32_t = ::std::os::raw::c_int;
+pub type __uint32_t = ::std::os::raw::c_uint;
+pub type __int64_t = ::std::os::raw::c_long;
+pub type __uint64_t = ::std::os::raw::c_ulong;
+pub type __int_least8_t = __int8_t;
+pub type __uint_least8_t = __uint8_t;
+pub type __int_least16_t = __int16_t;
+pub type __uint_least16_t = __uint16_t;
+pub type __int_least32_t = __int32_t;
+pub type __uint_least32_t = __uint32_t;
+pub type __int_least64_t = __int64_t;
+pub type __uint_least64_t = __uint64_t;
+pub type __quad_t = ::std::os::raw::c_long;
+pub type __u_quad_t = ::std::os::raw::c_ulong;
+pub type __intmax_t = ::std::os::raw::c_long;
+pub type __uintmax_t = ::std::os::raw::c_ulong;
+pub type __dev_t = ::std::os::raw::c_ulong;
+pub type __uid_t = ::std::os::raw::c_uint;
+pub type __gid_t = ::std::os::raw::c_uint;
+pub type __ino_t = ::std::os::raw::c_ulong;
+pub type __ino64_t = ::std::os::raw::c_ulong;
+pub type __mode_t = ::std::os::raw::c_uint;
+pub type __nlink_t = ::std::os::raw::c_ulong;
+pub type __off_t = ::std::os::raw::c_long;
+pub type __off64_t = ::std::os::raw::c_long;
+pub type __pid_t = ::std::os::raw::c_int;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __fsid_t {
+ pub __val: [::std::os::raw::c_int; 2usize],
+}
+pub type __clock_t = ::std::os::raw::c_long;
+pub type __rlim_t = ::std::os::raw::c_ulong;
+pub type __rlim64_t = ::std::os::raw::c_ulong;
+pub type __id_t = ::std::os::raw::c_uint;
+pub type __time_t = ::std::os::raw::c_long;
+pub type __useconds_t = ::std::os::raw::c_uint;
+pub type __suseconds_t = ::std::os::raw::c_long;
+pub type __daddr_t = ::std::os::raw::c_int;
+pub type __key_t = ::std::os::raw::c_int;
+pub type __clockid_t = ::std::os::raw::c_int;
+pub type __timer_t = *mut ::std::os::raw::c_void;
+pub type __blksize_t = ::std::os::raw::c_long;
+pub type __blkcnt_t = ::std::os::raw::c_long;
+pub type __blkcnt64_t = ::std::os::raw::c_long;
+pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
+pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
+pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
+pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
+pub type __fsword_t = ::std::os::raw::c_long;
+pub type __ssize_t = ::std::os::raw::c_long;
+pub type __syscall_slong_t = ::std::os::raw::c_long;
+pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
+pub type __loff_t = __off64_t;
+pub type __caddr_t = *mut ::std::os::raw::c_char;
+pub type __intptr_t = ::std::os::raw::c_long;
+pub type __socklen_t = ::std::os::raw::c_uint;
+pub type __sig_atomic_t = ::std::os::raw::c_int;
+pub type sig_atomic_t = __sig_atomic_t;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __sigset_t {
+ pub __val: [::std::os::raw::c_ulong; 16usize],
+}
+pub type sigset_t = __sigset_t;
+pub type pid_t = __pid_t;
+pub type uid_t = __uid_t;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct timespec {
+ pub tv_sec: __time_t,
+ pub tv_nsec: __syscall_slong_t,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union sigval {
+ pub sival_int: ::std::os::raw::c_int,
+ pub sival_ptr: *mut ::std::os::raw::c_void,
+ _bindgen_union_align: u64,
+}
+pub type __sigval_t = sigval;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct siginfo_t {
+ pub si_signo: ::std::os::raw::c_int,
+ pub si_errno: ::std::os::raw::c_int,
+ pub si_code: ::std::os::raw::c_int,
+ pub __pad0: ::std::os::raw::c_int,
+ pub _sifields: siginfo_t__bindgen_ty_1,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union siginfo_t__bindgen_ty_1 {
+ pub _pad: [::std::os::raw::c_int; 28usize],
+ pub _kill: siginfo_t__bindgen_ty_1__bindgen_ty_1,
+ pub _timer: siginfo_t__bindgen_ty_1__bindgen_ty_2,
+ pub _rt: siginfo_t__bindgen_ty_1__bindgen_ty_3,
+ pub _sigchld: siginfo_t__bindgen_ty_1__bindgen_ty_4,
+ pub _sigfault: siginfo_t__bindgen_ty_1__bindgen_ty_5,
+ pub _sigpoll: siginfo_t__bindgen_ty_1__bindgen_ty_6,
+ pub _sigsys: siginfo_t__bindgen_ty_1__bindgen_ty_7,
+ _bindgen_union_align: [u64; 14usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct siginfo_t__bindgen_ty_1__bindgen_ty_1 {
+ pub si_pid: __pid_t,
+ pub si_uid: __uid_t,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct siginfo_t__bindgen_ty_1__bindgen_ty_2 {
+ pub si_tid: ::std::os::raw::c_int,
+ pub si_overrun: ::std::os::raw::c_int,
+ pub si_sigval: __sigval_t,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct siginfo_t__bindgen_ty_1__bindgen_ty_3 {
+ pub si_pid: __pid_t,
+ pub si_uid: __uid_t,
+ pub si_sigval: __sigval_t,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct siginfo_t__bindgen_ty_1__bindgen_ty_4 {
+ pub si_pid: __pid_t,
+ pub si_uid: __uid_t,
+ pub si_status: ::std::os::raw::c_int,
+ pub si_utime: __clock_t,
+ pub si_stime: __clock_t,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5 {
+ pub si_addr: *mut ::std::os::raw::c_void,
+ pub si_addr_lsb: ::std::os::raw::c_short,
+ pub _bounds: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 {
+ pub _addr_bnd: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1,
+ pub _pkey: __uint32_t,
+ _bindgen_union_align: [u64; 2usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 {
+ pub _lower: *mut ::std::os::raw::c_void,
+ pub _upper: *mut ::std::os::raw::c_void,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct siginfo_t__bindgen_ty_1__bindgen_ty_6 {
+ pub si_band: ::std::os::raw::c_long,
+ pub si_fd: ::std::os::raw::c_int,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct siginfo_t__bindgen_ty_1__bindgen_ty_7 {
+ pub _call_addr: *mut ::std::os::raw::c_void,
+ pub _syscall: ::std::os::raw::c_int,
+ pub _arch: ::std::os::raw::c_uint,
+}
+pub const SI_ASYNCNL: _bindgen_ty_1 = -60;
+pub const SI_TKILL: _bindgen_ty_1 = -6;
+pub const SI_SIGIO: _bindgen_ty_1 = -5;
+pub const SI_ASYNCIO: _bindgen_ty_1 = -4;
+pub const SI_MESGQ: _bindgen_ty_1 = -3;
+pub const SI_TIMER: _bindgen_ty_1 = -2;
+pub const SI_QUEUE: _bindgen_ty_1 = -1;
+pub const SI_USER: _bindgen_ty_1 = 0;
+pub const SI_KERNEL: _bindgen_ty_1 = 128;
+pub type _bindgen_ty_1 = i32;
+pub const ILL_ILLOPC: _bindgen_ty_2 = 1;
+pub const ILL_ILLOPN: _bindgen_ty_2 = 2;
+pub const ILL_ILLADR: _bindgen_ty_2 = 3;
+pub const ILL_ILLTRP: _bindgen_ty_2 = 4;
+pub const ILL_PRVOPC: _bindgen_ty_2 = 5;
+pub const ILL_PRVREG: _bindgen_ty_2 = 6;
+pub const ILL_COPROC: _bindgen_ty_2 = 7;
+pub const ILL_BADSTK: _bindgen_ty_2 = 8;
+pub type _bindgen_ty_2 = u32;
+pub const FPE_INTDIV: _bindgen_ty_3 = 1;
+pub const FPE_INTOVF: _bindgen_ty_3 = 2;
+pub const FPE_FLTDIV: _bindgen_ty_3 = 3;
+pub const FPE_FLTOVF: _bindgen_ty_3 = 4;
+pub const FPE_FLTUND: _bindgen_ty_3 = 5;
+pub const FPE_FLTRES: _bindgen_ty_3 = 6;
+pub const FPE_FLTINV: _bindgen_ty_3 = 7;
+pub const FPE_FLTSUB: _bindgen_ty_3 = 8;
+pub type _bindgen_ty_3 = u32;
+pub const SEGV_MAPERR: _bindgen_ty_4 = 1;
+pub const SEGV_ACCERR: _bindgen_ty_4 = 2;
+pub const SEGV_BNDERR: _bindgen_ty_4 = 3;
+pub const SEGV_PKUERR: _bindgen_ty_4 = 4;
+pub type _bindgen_ty_4 = u32;
+pub const BUS_ADRALN: _bindgen_ty_5 = 1;
+pub const BUS_ADRERR: _bindgen_ty_5 = 2;
+pub const BUS_OBJERR: _bindgen_ty_5 = 3;
+pub const BUS_MCEERR_AR: _bindgen_ty_5 = 4;
+pub const BUS_MCEERR_AO: _bindgen_ty_5 = 5;
+pub type _bindgen_ty_5 = u32;
+pub const CLD_EXITED: _bindgen_ty_6 = 1;
+pub const CLD_KILLED: _bindgen_ty_6 = 2;
+pub const CLD_DUMPED: _bindgen_ty_6 = 3;
+pub const CLD_TRAPPED: _bindgen_ty_6 = 4;
+pub const CLD_STOPPED: _bindgen_ty_6 = 5;
+pub const CLD_CONTINUED: _bindgen_ty_6 = 6;
+pub type _bindgen_ty_6 = u32;
+pub const POLL_IN: _bindgen_ty_7 = 1;
+pub const POLL_OUT: _bindgen_ty_7 = 2;
+pub const POLL_MSG: _bindgen_ty_7 = 3;
+pub const POLL_ERR: _bindgen_ty_7 = 4;
+pub const POLL_PRI: _bindgen_ty_7 = 5;
+pub const POLL_HUP: _bindgen_ty_7 = 6;
+pub type _bindgen_ty_7 = u32;
+pub type sigval_t = __sigval_t;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct sigevent {
+ pub sigev_value: __sigval_t,
+ pub sigev_signo: ::std::os::raw::c_int,
+ pub sigev_notify: ::std::os::raw::c_int,
+ pub _sigev_un: sigevent__bindgen_ty_1,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union sigevent__bindgen_ty_1 {
+ pub _pad: [::std::os::raw::c_int; 12usize],
+ pub _tid: __pid_t,
+ pub _sigev_thread: sigevent__bindgen_ty_1__bindgen_ty_1,
+ _bindgen_union_align: [u64; 6usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct sigevent__bindgen_ty_1__bindgen_ty_1 {
+ pub _function: ::std::option::Option,
+ pub _attribute: *mut pthread_attr_t,
+}
+pub type sigevent_t = sigevent;
+pub const SIGEV_SIGNAL: _bindgen_ty_8 = 0;
+pub const SIGEV_NONE: _bindgen_ty_8 = 1;
+pub const SIGEV_THREAD: _bindgen_ty_8 = 2;
+pub const SIGEV_THREAD_ID: _bindgen_ty_8 = 4;
+pub type _bindgen_ty_8 = u32;
+pub type __sighandler_t = ::std::option::Option;
+extern "C" {
+ pub fn __sysv_signal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t)
+ -> __sighandler_t;
+}
+extern "C" {
+ pub fn signal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) -> __sighandler_t;
+}
+extern "C" {
+ pub fn kill(__pid: __pid_t, __sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn killpg(__pgrp: __pid_t, __sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn raise(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn ssignal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) -> __sighandler_t;
+}
+extern "C" {
+ pub fn gsignal(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn psignal(__sig: ::std::os::raw::c_int, __s: *const ::std::os::raw::c_char);
+}
+extern "C" {
+ pub fn psiginfo(__pinfo: *const siginfo_t, __s: *const ::std::os::raw::c_char);
+}
+extern "C" {
+ pub fn sigblock(__mask: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigsetmask(__mask: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn siggetmask() -> ::std::os::raw::c_int;
+}
+pub type sig_t = __sighandler_t;
+extern "C" {
+ pub fn sigemptyset(__set: *mut sigset_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigfillset(__set: *mut sigset_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigaddset(__set: *mut sigset_t, __signo: ::std::os::raw::c_int)
+ -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigdelset(__set: *mut sigset_t, __signo: ::std::os::raw::c_int)
+ -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigismember(
+ __set: *const sigset_t,
+ __signo: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct sigaction {
+ pub __sigaction_handler: sigaction__bindgen_ty_1,
+ pub sa_mask: __sigset_t,
+ pub sa_flags: ::std::os::raw::c_int,
+ pub sa_restorer: ::std::option::Option,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union sigaction__bindgen_ty_1 {
+ pub sa_handler: __sighandler_t,
+ pub sa_sigaction: ::std::option::Option<
+ unsafe extern "C" fn(
+ arg1: ::std::os::raw::c_int,
+ arg2: *mut siginfo_t,
+ arg3: *mut ::std::os::raw::c_void,
+ ),
+ >,
+ _bindgen_union_align: u64,
+}
+extern "C" {
+ pub fn sigprocmask(
+ __how: ::std::os::raw::c_int,
+ __set: *const sigset_t,
+ __oset: *mut sigset_t,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigsuspend(__set: *const sigset_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigaction(
+ __sig: ::std::os::raw::c_int,
+ __act: *const sigaction,
+ __oact: *mut sigaction,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigpending(__set: *mut sigset_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigwait(
+ __set: *const sigset_t,
+ __sig: *mut ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigwaitinfo(__set: *const sigset_t, __info: *mut siginfo_t) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigtimedwait(
+ __set: *const sigset_t,
+ __info: *mut siginfo_t,
+ __timeout: *const timespec,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn sigqueue(
+ __pid: __pid_t,
+ __sig: ::std::os::raw::c_int,
+ __val: sigval,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ #[link_name = "\u{1}_sys_siglist"]
+ pub static mut _sys_siglist: [*const ::std::os::raw::c_char; 65usize];
+}
+extern "C" {
+ #[link_name = "\u{1}sys_siglist"]
+ pub static mut sys_siglist: [*const ::std::os::raw::c_char; 65usize];
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _fpx_sw_bytes {
+ pub magic1: __uint32_t,
+ pub extended_size: __uint32_t,
+ pub xstate_bv: __uint64_t,
+ pub xstate_size: __uint32_t,
+ pub __glibc_reserved1: [__uint32_t; 7usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _fpreg {
+ pub significand: [::std::os::raw::c_ushort; 4usize],
+ pub exponent: ::std::os::raw::c_ushort,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _fpxreg {
+ pub significand: [::std::os::raw::c_ushort; 4usize],
+ pub exponent: ::std::os::raw::c_ushort,
+ pub __glibc_reserved1: [::std::os::raw::c_ushort; 3usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _xmmreg {
+ pub element: [__uint32_t; 4usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _fpstate {
+ pub cwd: __uint16_t,
+ pub swd: __uint16_t,
+ pub ftw: __uint16_t,
+ pub fop: __uint16_t,
+ pub rip: __uint64_t,
+ pub rdp: __uint64_t,
+ pub mxcsr: __uint32_t,
+ pub mxcr_mask: __uint32_t,
+ pub _st: [_fpxreg; 8usize],
+ pub _xmm: [_xmmreg; 16usize],
+ pub __glibc_reserved1: [__uint32_t; 24usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct sigcontext {
+ pub r8: __uint64_t,
+ pub r9: __uint64_t,
+ pub r10: __uint64_t,
+ pub r11: __uint64_t,
+ pub r12: __uint64_t,
+ pub r13: __uint64_t,
+ pub r14: __uint64_t,
+ pub r15: __uint64_t,
+ pub rdi: __uint64_t,
+ pub rsi: __uint64_t,
+ pub rbp: __uint64_t,
+ pub rbx: __uint64_t,
+ pub rdx: __uint64_t,
+ pub rax: __uint64_t,
+ pub rcx: __uint64_t,
+ pub rsp: __uint64_t,
+ pub rip: __uint64_t,
+ pub eflags: __uint64_t,
+ pub cs: ::std::os::raw::c_ushort,
+ pub gs: ::std::os::raw::c_ushort,
+ pub fs: ::std::os::raw::c_ushort,
+ pub __pad0: ::std::os::raw::c_ushort,
+ pub err: __uint64_t,
+ pub trapno: __uint64_t,
+ pub oldmask: __uint64_t,
+ pub cr2: __uint64_t,
+ pub __bindgen_anon_1: sigcontext__bindgen_ty_1,
+ pub __reserved1: [__uint64_t; 8usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union sigcontext__bindgen_ty_1 {
+ pub fpstate: *mut _fpstate,
+ pub __fpstate_word: __uint64_t,
+ _bindgen_union_align: u64,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _xsave_hdr {
+ pub xstate_bv: __uint64_t,
+ pub __glibc_reserved1: [__uint64_t; 2usize],
+ pub __glibc_reserved2: [__uint64_t; 5usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct _ymmh_state {
+ pub ymmh_space: [__uint32_t; 64usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct _xstate {
+ pub fpstate: _fpstate,
+ pub xstate_hdr: _xsave_hdr,
+ pub ymmh: _ymmh_state,
+}
+extern "C" {
+ pub fn sigreturn(__scp: *mut sigcontext) -> ::std::os::raw::c_int;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct stack_t {
+ pub ss_sp: *mut ::std::os::raw::c_void,
+ pub ss_flags: ::std::os::raw::c_int,
+ pub ss_size: usize,
+}
+pub type greg_t = ::std::os::raw::c_longlong;
+pub type gregset_t = [greg_t; 23usize];
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _libc_fpxreg {
+ pub significand: [::std::os::raw::c_ushort; 4usize],
+ pub exponent: ::std::os::raw::c_ushort,
+ pub __glibc_reserved1: [::std::os::raw::c_ushort; 3usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _libc_xmmreg {
+ pub element: [__uint32_t; 4usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct _libc_fpstate {
+ pub cwd: __uint16_t,
+ pub swd: __uint16_t,
+ pub ftw: __uint16_t,
+ pub fop: __uint16_t,
+ pub rip: __uint64_t,
+ pub rdp: __uint64_t,
+ pub mxcsr: __uint32_t,
+ pub mxcr_mask: __uint32_t,
+ pub _st: [_libc_fpxreg; 8usize],
+ pub _xmm: [_libc_xmmreg; 16usize],
+ pub __glibc_reserved1: [__uint32_t; 24usize],
+}
+pub type fpregset_t = *mut _libc_fpstate;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct mcontext_t {
+ pub gregs: gregset_t,
+ pub fpregs: fpregset_t,
+ pub __reserved1: [::std::os::raw::c_ulonglong; 8usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct ucontext_t {
+ pub uc_flags: ::std::os::raw::c_ulong,
+ pub uc_link: *mut ucontext_t,
+ pub uc_stack: stack_t,
+ pub uc_mcontext: mcontext_t,
+ pub uc_sigmask: sigset_t,
+ pub __fpregs_mem: _libc_fpstate,
+ pub __ssp: [::std::os::raw::c_ulonglong; 4usize],
+}
+extern "C" {
+ pub fn siginterrupt(
+ __sig: ::std::os::raw::c_int,
+ __interrupt: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+pub const SS_ONSTACK: _bindgen_ty_9 = 1;
+pub const SS_DISABLE: _bindgen_ty_9 = 2;
+pub type _bindgen_ty_9 = u32;
+extern "C" {
+ pub fn sigaltstack(__ss: *const stack_t, __oss: *mut stack_t) -> ::std::os::raw::c_int;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct sigstack {
+ pub ss_sp: *mut ::std::os::raw::c_void,
+ pub ss_onstack: ::std::os::raw::c_int,
+}
+extern "C" {
+ pub fn sigstack(__ss: *mut sigstack, __oss: *mut sigstack) -> ::std::os::raw::c_int;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __pthread_rwlock_arch_t {
+ pub __readers: ::std::os::raw::c_uint,
+ pub __writers: ::std::os::raw::c_uint,
+ pub __wrphase_futex: ::std::os::raw::c_uint,
+ pub __writers_futex: ::std::os::raw::c_uint,
+ pub __pad3: ::std::os::raw::c_uint,
+ pub __pad4: ::std::os::raw::c_uint,
+ pub __cur_writer: ::std::os::raw::c_int,
+ pub __shared: ::std::os::raw::c_int,
+ pub __rwelision: ::std::os::raw::c_schar,
+ pub __pad1: [::std::os::raw::c_uchar; 7usize],
+ pub __pad2: ::std::os::raw::c_ulong,
+ pub __flags: ::std::os::raw::c_uint,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __pthread_internal_list {
+ pub __prev: *mut __pthread_internal_list,
+ pub __next: *mut __pthread_internal_list,
+}
+pub type __pthread_list_t = __pthread_internal_list;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __pthread_mutex_s {
+ pub __lock: ::std::os::raw::c_int,
+ pub __count: ::std::os::raw::c_uint,
+ pub __owner: ::std::os::raw::c_int,
+ pub __nusers: ::std::os::raw::c_uint,
+ pub __kind: ::std::os::raw::c_int,
+ pub __spins: ::std::os::raw::c_short,
+ pub __elision: ::std::os::raw::c_short,
+ pub __list: __pthread_list_t,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct __pthread_cond_s {
+ pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1,
+ pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2,
+ pub __g_refs: [::std::os::raw::c_uint; 2usize],
+ pub __g_size: [::std::os::raw::c_uint; 2usize],
+ pub __g1_orig_size: ::std::os::raw::c_uint,
+ pub __wrefs: ::std::os::raw::c_uint,
+ pub __g_signals: [::std::os::raw::c_uint; 2usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union __pthread_cond_s__bindgen_ty_1 {
+ pub __wseq: ::std::os::raw::c_ulonglong,
+ pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1,
+ _bindgen_union_align: u64,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 {
+ pub __low: ::std::os::raw::c_uint,
+ pub __high: ::std::os::raw::c_uint,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union __pthread_cond_s__bindgen_ty_2 {
+ pub __g1_start: ::std::os::raw::c_ulonglong,
+ pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1,
+ _bindgen_union_align: u64,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 {
+ pub __low: ::std::os::raw::c_uint,
+ pub __high: ::std::os::raw::c_uint,
+}
+pub type pthread_t = ::std::os::raw::c_ulong;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_mutexattr_t {
+ pub __size: [::std::os::raw::c_char; 4usize],
+ pub __align: ::std::os::raw::c_int,
+ _bindgen_union_align: u32,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_condattr_t {
+ pub __size: [::std::os::raw::c_char; 4usize],
+ pub __align: ::std::os::raw::c_int,
+ _bindgen_union_align: u32,
+}
+pub type pthread_key_t = ::std::os::raw::c_uint;
+pub type pthread_once_t = ::std::os::raw::c_int;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_attr_t {
+ pub __size: [::std::os::raw::c_char; 56usize],
+ pub __align: ::std::os::raw::c_long,
+ _bindgen_union_align: [u64; 7usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_mutex_t {
+ pub __data: __pthread_mutex_s,
+ pub __size: [::std::os::raw::c_char; 40usize],
+ pub __align: ::std::os::raw::c_long,
+ _bindgen_union_align: [u64; 5usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_cond_t {
+ pub __data: __pthread_cond_s,
+ pub __size: [::std::os::raw::c_char; 48usize],
+ pub __align: ::std::os::raw::c_longlong,
+ _bindgen_union_align: [u64; 6usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_rwlock_t {
+ pub __data: __pthread_rwlock_arch_t,
+ pub __size: [::std::os::raw::c_char; 56usize],
+ pub __align: ::std::os::raw::c_long,
+ _bindgen_union_align: [u64; 7usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_rwlockattr_t {
+ pub __size: [::std::os::raw::c_char; 8usize],
+ pub __align: ::std::os::raw::c_long,
+ _bindgen_union_align: u64,
+}
+pub type pthread_spinlock_t = ::std::os::raw::c_int;
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_barrier_t {
+ pub __size: [::std::os::raw::c_char; 32usize],
+ pub __align: ::std::os::raw::c_long,
+ _bindgen_union_align: [u64; 4usize],
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union pthread_barrierattr_t {
+ pub __size: [::std::os::raw::c_char; 4usize],
+ pub __align: ::std::os::raw::c_int,
+ _bindgen_union_align: u32,
+}
+extern "C" {
+ pub fn pthread_sigmask(
+ __how: ::std::os::raw::c_int,
+ __newmask: *const __sigset_t,
+ __oldmask: *mut __sigset_t,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn pthread_kill(
+ __threadid: pthread_t,
+ __signo: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn __libc_current_sigrtmin() -> ::std::os::raw::c_int;
+}
+extern "C" {
+ pub fn __libc_current_sigrtmax() -> ::std::os::raw::c_int;
+}
diff --git a/bash-5.1/command.h b/bash-5.1/command.h
index 914198f9d4da00993de9f02415d45fb9b0622b1f..6dc337fb5a8104ea8766fef8c076613c6c35ed70 100644
--- a/bash-5.1/command.h
+++ b/bash-5.1/command.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* command.h -- The structures used internally to represent commands, and
the extern declarations of the functions used to create them. */
diff --git a/bash-5.1/config-bot.h b/bash-5.1/config-bot.h
index b075c77830eba41941f65e7c0de23d1b981f530f..d19618f1f84770529e2350c888c3fbfe517ba071 100644
--- a/bash-5.1/config-bot.h
+++ b/bash-5.1/config-bot.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* config-bot.h */
/* modify settings or make new ones based on what autoconf tells us. */
diff --git a/bash-5.1/config-top.h b/bash-5.1/config-top.h
index 5149f51129ae31c39dbd2f3728a11f221f547efe..ed4c7bffd8e85ec09c4954f20dd6e69c2e3b14ac 100644
--- a/bash-5.1/config-top.h
+++ b/bash-5.1/config-top.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* config-top.h - various user-settable options not under the control of autoconf. */
/* Copyright (C) 2002-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/conftypes.h b/bash-5.1/conftypes.h
index 1c8c5480a4ce3aeb7c156df7fcd17aff562eac14..ea677ccdf03554f941607dc233eba8fdfc0e8759 100644
--- a/bash-5.1/conftypes.h
+++ b/bash-5.1/conftypes.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* conftypes.h -- defines for build and host system. */
/* Copyright (C) 2001, 2005, 2008,2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/copy_cmd.c b/bash-5.1/copy_cmd.c
index 758ff238a111a8db9ab3ffe902c0eabd11c72766..2f71214b7dfe0596dff16fd93d57561dcb323746 100644
--- a/bash-5.1/copy_cmd.c
+++ b/bash-5.1/copy_cmd.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* copy_command.c -- copy a COMMAND structure. This is needed
primarily for making function definitions, but I'm not sure
that anyone else will need it. */
diff --git a/bash-5.1/dispose_cmd.c b/bash-5.1/dispose_cmd.c
index 5b22835be43faae5267451d56cb5de538ecb119f..e9f8142c2ccf282a80ed26c4c0c96ab8d0705759 100644
--- a/bash-5.1/dispose_cmd.c
+++ b/bash-5.1/dispose_cmd.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* dispose_command.c -- dispose of a COMMAND structure. */
/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/dispose_cmd.h b/bash-5.1/dispose_cmd.h
index 6095d44a4161de881e10bf1f4fa85d3c3f4b6c6b..7d5d6c3275903bb954644f8aaed57e0e7d8247c0 100644
--- a/bash-5.1/dispose_cmd.h
+++ b/bash-5.1/dispose_cmd.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* dispose_cmd.h -- Functions appearing in dispose_cmd.c. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/error.c b/bash-5.1/error.c
index 7df4b146ccdd6f8ddc5535594553f90c7c6ccd2e..12a4d0a5eb08d820a5daab2b07ef4e9f42b34cac 100644
--- a/bash-5.1/error.c
+++ b/bash-5.1/error.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* error.c -- Functions for handling errors. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/error.h b/bash-5.1/error.h
index 30828095b13b51eabbc59a2d406b35bdcd3ade5f..ecd6f0c8ff59e31f048e0ef052cfb81df7f231e1 100644
--- a/bash-5.1/error.h
+++ b/bash-5.1/error.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* error.h -- External declarations of functions appearing in error.c. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/eval.c b/bash-5.1/eval.c
index f19703342b54570a5a16f0cad8bc727571fb8ef4..27bb1da285385d13bd80adc25d1ff32f6a83332f 100644
--- a/bash-5.1/eval.c
+++ b/bash-5.1/eval.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* eval.c -- reading and evaluating commands. */
/* Copyright (C) 1996-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/execute_cmd.c b/bash-5.1/execute_cmd.c
index 2c7f2ea7f85e330cbec68ceb304a600b042df17b..15e58aed2f18a2cba705ec3b19aa94c383ec0251 100644
--- a/bash-5.1/execute_cmd.c
+++ b/bash-5.1/execute_cmd.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* execute_cmd.c -- Execute a COMMAND structure. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/execute_cmd.h b/bash-5.1/execute_cmd.h
index 9c7fd1cc342d9bbda6c1d0d6927a924e87b92877..43cfb218939e42539a04d93ae28a83ea8089e8af 100644
--- a/bash-5.1/execute_cmd.h
+++ b/bash-5.1/execute_cmd.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* execute_cmd.h - functions from execute_cmd.c. */
/* Copyright (C) 1993-2017 Free Software Foundation, Inc.
diff --git a/bash-5.1/expr.c b/bash-5.1/expr.c
index dd6406c11a45b37d16949215d533a8b4cbe16bf2..6131d0a0a9ca968809784aaff08198b6177711eb 100644
--- a/bash-5.1/expr.c
+++ b/bash-5.1/expr.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* expr.c -- arithmetic expression evaluation. */
/* Copyright (C) 1990-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/externs.h b/bash-5.1/externs.h
index 3d7716c6d1f58d979ac6361b8628b1b71683116a..d87cf67a2a820ef78d8b8d822b707323267744c1 100644
--- a/bash-5.1/externs.h
+++ b/bash-5.1/externs.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* externs.h -- extern function declarations which do not appear in their
own header file. */
diff --git a/bash-5.1/findcmd.c b/bash-5.1/findcmd.c
index e235705a37e0e5ecf1ca28caedaad2b7e62d75dc..7c6ce03890f5bf3cc6182699702e836e53ac48b3 100644
--- a/bash-5.1/findcmd.c
+++ b/bash-5.1/findcmd.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* findcmd.c -- Functions to search for commands by name. */
/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/findcmd.h b/bash-5.1/findcmd.h
index bf457814e24f4899f7666b95381086f735ff2292..feb594ed07e59ca809db5d5e2f3d02ffa1034f4e 100644
--- a/bash-5.1/findcmd.h
+++ b/bash-5.1/findcmd.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* findcmd.h - functions from findcmd.c. */
/* Copyright (C) 1997-2015,2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/flags.c b/bash-5.1/flags.c
index 983f9a507c8040de00e8b64b4c579a1a381ac809..2cab1778fc0725ec1717da64c938f648cc08599b 100644
--- a/bash-5.1/flags.c
+++ b/bash-5.1/flags.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* flags.c -- Everything about flags except the `set' command. That
is in builtins.c */
diff --git a/bash-5.1/flags.h b/bash-5.1/flags.h
index a3b5daa94f638cb7f297584bb9b4c8d77a75478f..dd51f3b2483ca8e52b4440a06b183a43973db005 100644
--- a/bash-5.1/flags.h
+++ b/bash-5.1/flags.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* flags.h -- a list of all the flags that the shell knows about. You add
a flag to this program by adding the name here, and in flags.c. */
diff --git a/bash-5.1/general.c b/bash-5.1/general.c
index 50d52167cea847e6bd389f1681cec35bb0a83805..e3b363049bac1603eaaa0c72b116551c843d5519 100644
--- a/bash-5.1/general.c
+++ b/bash-5.1/general.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* general.c -- Stuff that is used by all files. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/general.h b/bash-5.1/general.h
index faa3b65b5c6fb324bbee1f740c03f0ecf72aeffb..1c1d1c67c2f7b7d64a784fa1a1dbf0df77fdf514 100644
--- a/bash-5.1/general.h
+++ b/bash-5.1/general.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* general.h -- defines that everybody likes to use. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/hashcmd.c b/bash-5.1/hashcmd.c
index da3af005c206cb160d2e231f347469b285d7f794..144092b0c9fe28c89ca58ac9d7da8e60099eb895 100644
--- a/bash-5.1/hashcmd.c
+++ b/bash-5.1/hashcmd.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* hashcmd.c - functions for managing a hash table mapping command names to
full pathnames. */
diff --git a/bash-5.1/hashcmd.h b/bash-5.1/hashcmd.h
index 2459f200414c45499311556853dcfdc29afd994e..ce6c3bdd00673461312a05fc46260f44e54cf186 100644
--- a/bash-5.1/hashcmd.h
+++ b/bash-5.1/hashcmd.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* hashcmd.h - Common defines for hashing filenames. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/hashlib.c b/bash-5.1/hashlib.c
index 90b24d618c0c0719ab73fefac09e953e40b11003..c50a17f03651074ef87069bea495c87cfa57070f 100644
--- a/bash-5.1/hashlib.c
+++ b/bash-5.1/hashlib.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* hashlib.c -- functions to manage and access hash tables for bash. */
/* Copyright (C) 1987,1989,1991,1995,1998,2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/hashlib.h b/bash-5.1/hashlib.h
index cf2de9884006aba08e82fb126d18e2e2d47b2f3e..6cf0406cf1324fde1d99018e9ed0f526f6874c7b 100644
--- a/bash-5.1/hashlib.h
+++ b/bash-5.1/hashlib.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* hashlib.h -- the data structures used in hashing in Bash. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/input.c b/bash-5.1/input.c
index c57e81c362f9514b07aedf6d4c8d5d5d06635b45..d582030083e5b2251cc3b2abf5e0939274ab87bc 100644
--- a/bash-5.1/input.c
+++ b/bash-5.1/input.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* input.c -- functions to perform buffered input with synchronization. */
/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/input.h b/bash-5.1/input.h
index cb3eee4252f5e224e1b5754bc366cfbe1543cf55..1d7c216f2a0f9e7519db69b6fa8250d759bfe57a 100644
--- a/bash-5.1/input.h
+++ b/bash-5.1/input.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* input.h -- Structures and unions used for reading input. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/jobs.c b/bash-5.1/jobs.c
index a581f3053fdab36820288d3f64b8eb22c81db863..43c569e4601250620394867aa581e51051fa5d78 100644
--- a/bash-5.1/jobs.c
+++ b/bash-5.1/jobs.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* jobs.c - functions that make children, remember them, and handle their termination. */
/* This file works with both POSIX and BSD systems. It implements job
@@ -112,6 +113,7 @@ extern int killpg PARAMS((pid_t, int));
#define DEL_WARNSTOPPED 1 /* warn about deleting stopped jobs */
#define DEL_NOBGPID 2 /* don't add pgrp leader to bgpids */
+int wait_intr_flag = 0;
/* Take care of system dependencies that must be handled when waiting for
children. The arguments to the WAITPID macro match those to the Posix.1
waitpid() function. */
@@ -236,6 +238,7 @@ PROCESS *last_procsub_child = (PROCESS *)NULL;
/* Functions local to this file. */
void debug_print_pgrps (void);
+procenv_t wait_intr_buf;
static sighandler wait_sigint_handler PARAMS((int));
static sighandler sigchld_handler PARAMS((int));
diff --git a/bash-5.1/jobs.h b/bash-5.1/jobs.h
index 43ba8c23b291623230a5230e0ba55ee73ac78522..0cbc4754ca8b8e1bdfc2566328132de6d4350275 100644
--- a/bash-5.1/jobs.h
+++ b/bash-5.1/jobs.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* jobs.h -- structures and definitions used by the jobs.c file. */
/* Copyright (C) 1993-2019 Free Software Foundation, Inc.
@@ -75,6 +76,7 @@ struct pipeline_saver {
struct pipeline_saver *next;
};
+ extern int wait_intr_flag ;
/* PALIVE really means `not exited' */
#define PSTOPPED(p) (WIFSTOPPED((p)->status))
#define PRUNNING(p) ((p)->running == PS_RUNNING)
diff --git a/bash-5.1/list.c b/bash-5.1/list.c
index 88835f58e517bcd1f510183048478278e020f76f..a7666e78ec02e2cd8772f9a762db6d801015723e 100644
--- a/bash-5.1/list.c
+++ b/bash-5.1/list.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* list.c - Functions for manipulating linked lists of objects. */
/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/locale.c b/bash-5.1/locale.c
index a6c07a3764025d568c3e5609f6e69739685dbe5b..4eddb1ea687abb131479f75d0cdca693bf470763 100644
--- a/bash-5.1/locale.c
+++ b/bash-5.1/locale.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* locale.c - Miscellaneous internationalization functions. */
/* Copyright (C) 1996-2009,2012,2016,2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/mailcheck.c b/bash-5.1/mailcheck.c
index 4a11143cc83b3d5d7d01623ee12ce5f3cb8268ea..c0d1b8b0ff29d7f383d656876cf6fbb0e5736385 100644
--- a/bash-5.1/mailcheck.c
+++ b/bash-5.1/mailcheck.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* mailcheck.c -- The check is in the mail... */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/mailcheck.h b/bash-5.1/mailcheck.h
index e930124c3a47871a620082c644b8ad5deae0e52b..c417c9e83d4960b33b37fe170fd3e21934870321 100644
--- a/bash-5.1/mailcheck.h
+++ b/bash-5.1/mailcheck.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* mailcheck.h -- variables and function declarations for mail checking. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/make_cmd.c b/bash-5.1/make_cmd.c
index ac53526821012b491b98631519cf040877e0009d..ee697a017e89aef3b2e393883255258dbc58bf03 100644
--- a/bash-5.1/make_cmd.c
+++ b/bash-5.1/make_cmd.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* make_cmd.c -- Functions for making instances of the various
parser constructs. */
diff --git a/bash-5.1/make_cmd.h b/bash-5.1/make_cmd.h
index bf1fb008df32aee951c3e73ea7f683d09b1b0d2d..ddfa964cb748287e193397623993b1d04ae28170 100644
--- a/bash-5.1/make_cmd.h
+++ b/bash-5.1/make_cmd.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* make_cmd.h -- Declarations of functions found in make_cmd.c */
/* Copyright (C) 1993-2009,2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/mksyntax.c b/bash-5.1/mksyntax.c
index 03856866a34bfe2b084b7a319cbd1af2b7d02f58..a5b49e2b3e554c19c22c688c7f9240c68deb924a 100644
--- a/bash-5.1/mksyntax.c
+++ b/bash-5.1/mksyntax.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/*
* mksyntax.c - construct shell syntax table for fast char attribute lookup.
*/
diff --git a/bash-5.1/nojobs.c b/bash-5.1/nojobs.c
index c5fc83d90a1538fd7d50fd898662219ec272c003..4b59a8800e2635afe465a9f2c265706c0d381913 100644
--- a/bash-5.1/nojobs.c
+++ b/bash-5.1/nojobs.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* nojobs.c - functions that make children, remember them, and handle their termination. */
/* This file works under BSD, System V, minix, and Posix systems. It does
diff --git a/bash-5.1/parse.y b/bash-5.1/parse.y
index 2449fa80c860a3832f28c10d0298cbe88d56a47c..ffda9f8918d9b6db6dee930d753e88159230ca79 100644
--- a/bash-5.1/parse.y
+++ b/bash-5.1/parse.y
@@ -323,6 +323,7 @@ static REDIRECTEE redir;
static FILE *yyoutstream;
static FILE *yyerrstream;
+extern int r_exit_builtin ( WORD_LIST *list);
%}
%union {
@@ -6443,8 +6444,8 @@ handle_eof_input_unit ()
reset_parser ();
last_shell_builtin = this_shell_builtin;
- this_shell_builtin = exit_builtin;
- exit_builtin ((WORD_LIST *)NULL);
+ this_shell_builtin = r_exit_builtin;
+ r_exit_builtin ((WORD_LIST *)NULL);
}
else
{
diff --git a/bash-5.1/parser.h b/bash-5.1/parser.h
index 59bddacaf6405553a6ea00611bea7e00db411ec7..f9a5660726b39c19ebea0ebe296c8cfb594d4985 100644
--- a/bash-5.1/parser.h
+++ b/bash-5.1/parser.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* parser.h -- Everything you wanted to know about the parser, but were
afraid to ask. */
diff --git a/bash-5.1/patchlevel.h b/bash-5.1/patchlevel.h
index e1429c245ffb845f2c7ae586bc54b86f5af9d038..2ce66a3e7e980eafe054e5dd6c5a5f4e0b41d173 100644
--- a/bash-5.1/patchlevel.h
+++ b/bash-5.1/patchlevel.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* patchlevel.h -- current bash patch level */
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/pathexp.c b/bash-5.1/pathexp.c
index 6e7ef283d8960419c056724e840c87891ea5e41d..3b562b82b732ff4710c34e7d74fcdee02d500267 100644
--- a/bash-5.1/pathexp.c
+++ b/bash-5.1/pathexp.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* pathexp.c -- The shell interface to the globbing library. */
/* Copyright (C) 1995-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/pathexp.h b/bash-5.1/pathexp.h
index 7ed0d2ad6904be1c8873073465f67b87b35030ec..a43edf734c5a01590c649f4e7a3fdbd8c75fffa9 100644
--- a/bash-5.1/pathexp.h
+++ b/bash-5.1/pathexp.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* pathexp.h -- The shell interface to the globbing library. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/pcomplete.c b/bash-5.1/pcomplete.c
index fe1a03200a3d044ed2efaf2d4565c434ef67b40c..7fe46bad24c2b306e4abca03fbfca5d090d82535 100644
--- a/bash-5.1/pcomplete.c
+++ b/bash-5.1/pcomplete.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* pcomplete.c - functions to generate lists of matches for programmable completion. */
/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/pcomplete.h b/bash-5.1/pcomplete.h
index 2a68e6a3f0c9c94071bb5574bceec957040190c5..b4e7e7fdda76e20bb5aaff655c9ebfed3495ebd2 100644
--- a/bash-5.1/pcomplete.h
+++ b/bash-5.1/pcomplete.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* pcomplete.h - structure definitions and other stuff for programmable
completion. */
diff --git a/bash-5.1/pcomplib.c b/bash-5.1/pcomplib.c
index 6cec7492a4c4f36f15f6457a8929e85917623cfb..9f8eae75250b5d5a78944fdd9f79d7c5c2445814 100644
--- a/bash-5.1/pcomplib.c
+++ b/bash-5.1/pcomplib.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* pcomplib.c - library functions for programmable completion. */
/* Copyright (C) 1999-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/print_cmd.c b/bash-5.1/print_cmd.c
index 3c8c2d8fff892d82664caee0bb840d8affd5cbd4..0f7c2131d5dcdb518e34af77c873349a77af276a 100644
--- a/bash-5.1/print_cmd.c
+++ b/bash-5.1/print_cmd.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* print_command -- A way to make readable commands from a command tree. */
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/quit.h b/bash-5.1/quit.h
index db8a776b595d780ea1734309c283446bd7b44674..6470ed5df935fff07bf01edf3b0faef4c2984c4c 100644
--- a/bash-5.1/quit.h
+++ b/bash-5.1/quit.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* quit.h -- How to handle SIGINT gracefully. */
/* Copyright (C) 1993-2013 Free Software Foundation, Inc.
diff --git a/bash-5.1/redir.c b/bash-5.1/redir.c
index fa92b4d4179ca5c7dc7d30c99657e064519f17b0..83921462507f377a8b01e6359c9d9db0efd6dbff 100644
--- a/bash-5.1/redir.c
+++ b/bash-5.1/redir.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* redir.c -- Functions to perform input and output redirection. */
/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/redir.h b/bash-5.1/redir.h
index 64a3d26698707a9e62e6af29e05cc17d396c19cb..344b4fa543fd585750154d6f120e8dff8a0b443d 100644
--- a/bash-5.1/redir.h
+++ b/bash-5.1/redir.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* redir.h - functions from redir.c. */
/* Copyright (C) 1997, 2001, 2005, 2008, 2009-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/rsbuiltins.h b/bash-5.1/rsbuiltins.h
index f6f3be36af13058d9fcb82d8cc048c5a0921f165..92ee279037a34dc0f143987dad79c8779c7ca103 100644
--- a/bash-5.1/rsbuiltins.h
+++ b/bash-5.1/rsbuiltins.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
#include
#include "command.h"
int r_execute_cmd();
diff --git a/bash-5.1/shell.c b/bash-5.1/shell.c
index 7dcd000a67b1bfa36f0616c01d02324d366c5e6b..26a5324415a8f41f022cd1e98cb80b8166cb796d 100644
--- a/bash-5.1/shell.c
+++ b/bash-5.1/shell.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* shell.c -- GNU's idea of the POSIX shell specification. */
/* Copyright (C) 1987-2019 Free Software Foundation, Inc.
diff --git a/bash-5.1/shell.h b/bash-5.1/shell.h
index 29b0efb8e3a8178cd295c089d4c1ffd535610d38..bda3c37de3436f7f239aa22016b93a94e45d7a7c 100644
--- a/bash-5.1/shell.h
+++ b/bash-5.1/shell.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* shell.h -- The data structures used by the shell */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/sig.c b/bash-5.1/sig.c
index 6964d862cb76e15e207720e20dcfefcb6d20600c..950c23f6e863cb20821f3394dce0759a1bbc976a 100644
--- a/bash-5.1/sig.c
+++ b/bash-5.1/sig.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* sig.c - interface for shell signal handlers and signal initialization. */
/* Copyright (C) 1994-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/sig.h b/bash-5.1/sig.h
index a564e3cd9a857314695a07014d69065cecd27f31..4f90a889d5f9e8d8aa03fe0b415dfa87292f4dde 100644
--- a/bash-5.1/sig.h
+++ b/bash-5.1/sig.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* sig.h -- header file for signal handler definitions. */
/* Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/bash-5.1/siglist.c b/bash-5.1/siglist.c
index d8361dd791aad5a6e87dac8076a58e4daa02f4ed..1636ad1b37dc322247e324080fd263e8cce17756 100644
--- a/bash-5.1/siglist.c
+++ b/bash-5.1/siglist.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* siglist.c -- signal list for those machines that don't have one. */
/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/siglist.h b/bash-5.1/siglist.h
index 321c20c461ecfb54e64b29c30a4f874bfb4855c8..6d04ae841523df530fbdb0300683da916906ae41 100644
--- a/bash-5.1/siglist.h
+++ b/bash-5.1/siglist.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* siglist.h -- encapsulate various definitions for sys_siglist */
/* Copyright (C) 1993, 2001, 2005, 2008-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/src/lib.rs b/bash-5.1/src/lib.rs
index a742d42794e07464ab95baf64bba7c71e041c9f5..8bb5ec21c10a7f5337f9d7d6cd26866b7d4b7c05 100644
--- a/bash-5.1/src/lib.rs
+++ b/bash-5.1/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_char, c_int };
use std::ffi::CStr;
use std::str;
diff --git a/bash-5.1/src/main.rs b/bash-5.1/src/main.rs
index ab6dd25bc02ba7016af5ff16f6c302dc001b2321..fbac9e408a5ae0a71ecb9e6dc7984babd6422209 100644
--- a/bash-5.1/src/main.rs
+++ b/bash-5.1/src/main.rs
@@ -1,3 +1,9 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
//use command1::say_hello;
//use command2::hello2;
diff --git a/bash-5.1/stringlib.c b/bash-5.1/stringlib.c
index 745e5363a99ab14e194248e756b0a96bb0a6d489..0cc26cf832ee9efccdd0ae5ce105b5ad98e3a9d6 100644
--- a/bash-5.1/stringlib.c
+++ b/bash-5.1/stringlib.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* stringlib.c - Miscellaneous string functions. */
/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
diff --git a/bash-5.1/subst.c b/bash-5.1/subst.c
index bac3c756475fb67a93e79748c215f58df5f5744e..d80c8d04bec47c697846e6aad920e26a879a9a3d 100644
--- a/bash-5.1/subst.c
+++ b/bash-5.1/subst.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* subst.c -- The part of the shell that does parameter, command, arithmetic,
and globbing substitutions. */
diff --git a/bash-5.1/subst.h b/bash-5.1/subst.h
index 134765158db97c32733ec75323095904d19b5245..838ee1e6b164b9f668c0d306246c6adb8af48d3b 100644
--- a/bash-5.1/subst.h
+++ b/bash-5.1/subst.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* subst.h -- Names of externally visible functions in subst.c. */
/* Copyright (C) 1993-2017 Free Software Foundation, Inc.
diff --git a/bash-5.1/syntax.h b/bash-5.1/syntax.h
index 34f54964744a8ed76f3f92bda97d41fa8b2240e9..5d9eedd0c70cbf11480f34e68545691c13705e40 100644
--- a/bash-5.1/syntax.h
+++ b/bash-5.1/syntax.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* syntax.h -- Syntax definitions for the shell */
/* Copyright (C) 2000, 2001, 2005, 2008, 2009-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/test.c b/bash-5.1/test.c
index e2fd78b359e92804f03b5852397196c4b7f3db70..27de85a905925d575cebf50960ab769daa05c550 100644
--- a/bash-5.1/test.c
+++ b/bash-5.1/test.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* test.c - GNU test program (ksb and mjb) */
/* Modified to run with the GNU shell Apr 25, 1988 by bfox. */
diff --git a/bash-5.1/test.h b/bash-5.1/test.h
index ea3c33e956f7afde7238ed3106685a76830a84c1..e5efe80a9b7eefc9e9721febe0f099f4bdcc3ea4 100644
--- a/bash-5.1/test.h
+++ b/bash-5.1/test.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* test.h -- external interface to the conditional command code. */
/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/trap.c b/bash-5.1/trap.c
index c7f8ded56f7dbe20d4178853bca0f478bad6efbb..42c9505397e0d189bc2f52ca43f14468318a9890 100644
--- a/bash-5.1/trap.c
+++ b/bash-5.1/trap.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* trap.c -- Not the trap command, but useful functions for manipulating
those objects. The trap command is in builtins/trap.def. */
diff --git a/bash-5.1/trap.h b/bash-5.1/trap.h
index ef64a68030ffcb7284a7948d7d8908b7443a486e..3ed9650220f5c751af8d7572060d4ba017531fec 100644
--- a/bash-5.1/trap.h
+++ b/bash-5.1/trap.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* trap.h -- data structures used in the trap mechanism. */
/* Copyright (C) 1993-2013 Free Software Foundation, Inc.
diff --git a/bash-5.1/u_src/src/lib.rs b/bash-5.1/u_src/src/lib.rs
index d4bde5477a22231e7c01b52f5b3ea83a5e55bf9c..3aff14f74415ec7e85c45a7bad3ee1eaf3e91204 100644
--- a/bash-5.1/u_src/src/lib.rs
+++ b/bash-5.1/u_src/src/lib.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
mod libs;
//在下面添加模块
diff --git a/bash-5.1/u_src/src/libs/command_h.rs b/bash-5.1/u_src/src/libs/command_h.rs
index d8757b934e381c5edf5d7bb66a8b42b00afb1e7a..63a5c9e594522322c7e69c604e9db36a11b5cb06 100644
--- a/bash-5.1/u_src/src/libs/command_h.rs
+++ b/bash-5.1/u_src/src/libs/command_h.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
/* automatically generated by rust-bindgen 0.64.0 */
pub const REDIR_VARASSIGN: u32 = 1;
diff --git a/bash-5.1/u_src/src/libs/mod.rs b/bash-5.1/u_src/src/libs/mod.rs
index fa4a310380e788280ba45aa1117293271dcc5d45..8d33d5533eb368ff907458f8832466b4f46d5e3e 100644
--- a/bash-5.1/u_src/src/libs/mod.rs
+++ b/bash-5.1/u_src/src/libs/mod.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
//添加文件名
pub mod struct_macro;
pub mod command_h;
diff --git a/bash-5.1/u_src/src/libs/print_cmd.rs b/bash-5.1/u_src/src/libs/print_cmd.rs
index 3cfac7b1a4de8802b3a7b5b52e47bd093db17884..ffa29a6a0e5f955d2101cf74e7e87272f9db0a18 100644
--- a/bash-5.1/u_src/src/libs/print_cmd.rs
+++ b/bash-5.1/u_src/src/libs/print_cmd.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use super::{ command_h};
use libc::{c_int,c_char,FILE};
use command_h::{COMMAND,REDIRECT};
diff --git a/bash-5.1/u_src/src/libs/struct_macro.rs b/bash-5.1/u_src/src/libs/struct_macro.rs
index 69117a9b24584adcb90b0d11ddd491830dab514a..279dfe346ee8212993b070a830274fae60b0d19b 100644
--- a/bash-5.1/u_src/src/libs/struct_macro.rs
+++ b/bash-5.1/u_src/src/libs/struct_macro.rs
@@ -1,3 +1,6 @@
+//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+
+//# SPDX-License-Identifier: GPL-3.0-or-later
use libc::{c_int,c_char,c_uint};
diff --git a/bash-5.1/unwind_prot.c b/bash-5.1/unwind_prot.c
index 5703777fe3acc8952e241407e34d6595498ac700..e12579f5474264c14ca14bffa481887fd93624fa 100644
--- a/bash-5.1/unwind_prot.c
+++ b/bash-5.1/unwind_prot.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* unwind_prot.c - a simple unwind-protect system for internal variables */
/* I can't stand it anymore! Please can't we just write the
diff --git a/bash-5.1/unwind_prot.h b/bash-5.1/unwind_prot.h
index 97b3af90236b66fb757186041a0af7633ba6a9ca..db3e4eba93308e5845cecaf7f66e35ff2c29c841 100644
--- a/bash-5.1/unwind_prot.h
+++ b/bash-5.1/unwind_prot.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* unwind_prot.h - Macros and functions for hacking unwind protection. */
/* Copyright (C) 1993-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/variables.c b/bash-5.1/variables.c
index 132bb0cc8db6394de9d462cf202a747c0ed2fc20..0566f0db7b6334631a9c94b6943366333bc61f37 100644
--- a/bash-5.1/variables.c
+++ b/bash-5.1/variables.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* variables.c -- Functions for hacking shell variables. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/variables.h b/bash-5.1/variables.h
index a5a70919e737b689aa5df1c95b94ff94db06444f..d7074e403f09bea3592722a4c0625927aa82988d 100644
--- a/bash-5.1/variables.h
+++ b/bash-5.1/variables.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* variables.h -- data structures for shell variables. */
/* Copyright (C) 1987-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/version.c b/bash-5.1/version.c
index 8c1568ae4bc94b3a003c048de18aebab796becea..876cd14f6bfb9d73efddc48b720e457da29dc8aa 100644
--- a/bash-5.1/version.c
+++ b/bash-5.1/version.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* version.c -- distribution and version numbers. */
/* Copyright (C) 1989-2020 Free Software Foundation, Inc.
diff --git a/bash-5.1/xmalloc.c b/bash-5.1/xmalloc.c
index 1b3b40887a886943cddb7a1daa23d281eca2a752..1e7ed274e851b2467efa9b1c636af9e5151c6e17 100644
--- a/bash-5.1/xmalloc.c
+++ b/bash-5.1/xmalloc.c
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* xmalloc.c -- safe versions of malloc and realloc */
/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
diff --git a/bash-5.1/xmalloc.h b/bash-5.1/xmalloc.h
index 55d2e3d048ab2b4a8bec2e2b0fd0dfe641a793b1..752b8b1905e6e8d939d44b4e6a38f0a8e053f4f5 100644
--- a/bash-5.1/xmalloc.h
+++ b/bash-5.1/xmalloc.h
@@ -1,3 +1,4 @@
+//# This file was modified by UnionTech Software Technology Co., Ltd. in 2023/05/30
/* xmalloc.h -- defines for the `x' memory allocation functions */
/* Copyright (C) 2001-2020 Free Software Foundation, Inc.
diff --git a/record.txt b/record.txt
index a22226c8044f0a6a6cfef213c965d32da0f010ef..32a0bed965207290990c53fc0529a0d3f4327e46 100644
--- a/record.txt
+++ b/record.txt
@@ -125,3 +125,4 @@
124
125
126
+127