Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
procps
procps-ng-3.3.9-sysctl-iobuf.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File procps-ng-3.3.9-sysctl-iobuf.patch of Package procps
--- sysctl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- sysctl.c +++ sysctl.c 2017-07-06 09:35:09.128849737 +0000 @@ -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; @@ -217,6 +219,9 @@ static int ReadSetting(const char *restr fp = fopen(tmpname, "r"); + if (iobuf) + setvbuf(fp, iobuf, _IOFBF, IOBUFSIZ); + if (!fp) { switch (errno) { case ENOENT: @@ -432,6 +437,9 @@ static int WriteSetting(const char *sett fp = fopen(tmpname, "w"); + if (iobuf) + setvbuf(fp, iobuf, _IOFBF, IOBUFSIZ); + if (!fp) { switch (errno) { case ENOENT: @@ -793,6 +801,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