We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
int sigar_file2str(const char *fname, char *buffer, int buflen) { int len, status; int fd = open(fname, O_RDONLY);
if (fd < 0) { return ENOENT; } if ((len = read(fd, buffer, buflen)) < 0) { status = errno; } else { status = SIGAR_OK; /* buffer[len] = '\0'; is bug? */ buffer[len - 1] = '\0'; } close(fd); return status;
}
The text was updated successfully, but these errors were encountered:
linux fd(PROC_STAT)equal to 8192, Linux platform stdio.h:# define BUFSIZ _IO_BUFSIZ libio.h:#define _IO_BUFSIZ _G_BUFSIZ _G_config.h:#define _G_BUFSIZ 8192
Sorry, something went wrong.
No branches or pull requests
int sigar_file2str(const char *fname, char *buffer, int buflen)
{
int len, status;
int fd = open(fname, O_RDONLY);
}
The text was updated successfully, but these errors were encountered: