]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
procps: replaced one use of fputs(3) with a write(2) call
authorMingli Yu <mingli.yu@windriver.com>
Tue, 18 Feb 2025 07:12:24 +0000 (15:12 +0800)
committerSteve Sakoman <steve@sakoman.com>
Wed, 19 Feb 2025 14:43:20 +0000 (06:43 -0800)
commit573f5b2d8fec9f8a4ed17e836ef3feeb6de62e5a
treeae7ee63022d86d15c2e5613108a7d8033f5929fb
parent44e1279970d306b0da4fcc11f9e780915f481819
procps: replaced one use of fputs(3) with a write(2) call

This patch is ported from a merge request shown below,
and the following represents the original commit text.

------------------------------------------------------
top: In the bye_bye function, replace fputs with the write interface.

When top calls malloc, if a signal is received, it will
call sig_endpgm to process the signal. In the bye_bye function, if the
-b option is enable, the Batch variable is set, the fputs function
will calls malloc at the same time. The malloc function is not reentrant, so
it will cause the program to crash.

Signed-off-by: Shaohua Zhan <shaohua.zhan@windriver.com>
------------------------------------------------------

Reference(s):
https://gitlab.com/procps-ng/procps/-/merge_requests/127

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-extended/procps/procps/0001-top-fix-a-fix-for-the-bye_bye-function-merge-127.patch [new file with mode: 0644]
meta/recipes-extended/procps/procps/0001-top-replaced-one-use-of-fputs-3-with-a-write-2-call.patch [new file with mode: 0644]
meta/recipes-extended/procps/procps_3.3.17.bb