Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:ARM:Staging
procps
procps-ng-3.3.12-sysctl-iobuf.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File procps-ng-3.3.12-sysctl-iobuf.patch of Package procps
--- sysctl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) Index: sysctl.c =================================================================== --- sysctl.c.orig +++ sysctl.c @@ -160,6 +160,8 @@ static char *StripLeadingAndTrailingSpac /* * Read a sysctl setting */ +#define IOBUFSIZ (128<<10) +static char *iobuf; static int ReadSetting(const char *restrict const name) { int rc = 0; @@ -240,6 +242,8 @@ static int ReadSetting(const char *restr break; } } else { + if (iobuf) + setvbuf(fp, iobuf, _IOFBF, IOBUFSIZ); errno = 0; if (fgets(inbuf, sizeof inbuf - 1, fp)) { /* this loop is required, see @@ -450,6 +454,8 @@ static int WriteSetting(const char *sett break; } } else { + if (iobuf) + setvbuf(fp, iobuf, _IOFBF, IOBUFSIZ); rc = fprintf(fp, "%s\n", value); if (0 < rc) rc = 0; @@ -806,6 +812,8 @@ int main(int argc, char *argv[]) argc -= optind; argv += optind; + iobuf = (char*)malloc(IOBUFSIZ); /* Allow to fail */ + if (DisplayAllOpt) return DisplayAll(PROC_PATH);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor