]> granicus.if.org Git - procps-ng/commit
sysctl: Return non-zero if param setting failed
authorJan Rybar <jrybar@redhat.com>
Wed, 15 Sep 2021 11:07:43 +0000 (21:07 +1000)
committerCraig Small <csmall@dropbear.xyz>
Wed, 15 Sep 2021 11:07:43 +0000 (21:07 +1000)
commit08aa15ce4bc70a8e33574f5c7d5ff9bafe745bae
treef67927988f819a914a1d85e1f9aac4dfe2ccc32a
parente886010ef79605e6d239e14209bdc5dccd412492
sysctl: Return non-zero if param setting failed

Real usecase:
'sysctl -w user.max_uts_namespaces=2147483648; echo $?'
returns 0 even though it failed with EINVAL

The close_stream() realised there was an issue and printed an
error but didn't change the return value.

Slightly modified merge request.

References:
 procps-ng/procps!76

Signed-off-by: Craig Small <csmall@dropbear.xyz>
NEWS
sysctl.c