feat: Add pipeline null check logic 09/285909/1 accepted/tizen_7.0_base accepted/tizen_7.0_base_tool tizen_7.0_base accepted/tizen/7.0/base/20230714.003156 accepted/tizen/7.0/base/tool/20221223.083106 submit/tizen_7.0_base/20221222.072802
authorDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 22 Dec 2022 07:22:35 +0000 (16:22 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Thu, 22 Dec 2022 07:23:33 +0000 (16:23 +0900)
Change-Id: I2fd33d92ef112290448d08aabd0ed7ec29ab9fbf

packaging/add_pipeline_null_check.patch [new file with mode: 0644]
packaging/bash.spec

diff --git a/packaging/add_pipeline_null_check.patch b/packaging/add_pipeline_null_check.patch
new file mode 100644 (file)
index 0000000..398d728
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/jobs.c b/jobs.c
+index d183394..b6f951f 100644
+--- a/jobs.c
++++ b/jobs.c
+@@ -1275,6 +1275,8 @@ find_pipeline (pid, alive_only, jobp)
+       p = the_pipeline;
+       do
+       {
++      if ( p == 0x00 ) break;
++
+         /* Return it if we found it.  Don't ever return a recycled pid. */
+         if (p->pid == pid && ((alive_only == 0 && PRECYCLED(p) == 0) || PALIVE(p)))
+           return (p);
index 60863b5b396b2d658f049f12c7761ef8808f6193..e823f04f22c0099b4577f08d2e54fdb8a812c5bd 100644 (file)
@@ -13,6 +13,7 @@ Url:            http://www.gnu.org/software/bash
 Group:          Base/Utilities
 Source0:        %{name}-%{version}.tar.gz
 Source1001:    bash.manifest
+Source1002:    add_pipeline_null_check.patch
 BuildRequires:  autoconf
 BuildRequires:  bison
 BuildRequires:  fdupes
@@ -29,6 +30,7 @@ incorporates useful features from the Korn shell (ksh) and the C shell
 %prep
 %setup -q
 cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE1002}
 
 %build
 export CFLAGS+=" -fPIC -fvisibility=hidden -flto "