Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 876851 Details for
Bug 1078894
readahead does not return error on pipes and sockets
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
readahead test program
readahead-pipe-socket.c (text/plain), 1.03 KB, created by
Jeff Bastian
on 2014-03-20 13:55:46 UTC
(
hide
)
Description:
readahead test program
Filename:
MIME Type:
Creator:
Jeff Bastian
Created:
2014-03-20 13:55:46 UTC
Size:
1.03 KB
patch
obsolete
>#define _GNU_SOURCE >#include <stdlib.h> >#include <stdio.h> >#include <errno.h> >#include <fcntl.h> >#include <unistd.h> >#include <sys/types.h> >#include <sys/socket.h> >#include <sys/syscall.h> > >int main(void) >{ > int fd[2]; > int ret; > int errsave; > > printf("test_invalid_fd pipe:\n"); > if (pipe(fd) < 0) { > printf("Failed to create pipe\n"); > exit(-1); > } > ret = syscall(__NR_readahead, fd[0], 0, getpagesize()); > errsave = errno; > printf(" %s: readahead returned %d\n", > (ret == -1) ? "success" : "failure", ret); > printf(" %s: errno is %d\n", > (errsave == EINVAL) ? "success" : "failure", errsave); > close(fd[0]); > close(fd[1]); > > printf("test_invalid_fd socket:\n"); > fd[0] = socket(AF_INET, SOCK_STREAM, 0); > if (fd[0] < 0) { > printf("Failed to create socket\n"); > exit(-1); > } > ret = syscall(__NR_readahead, fd[0], 0, getpagesize()); > errsave = errno; > printf(" %s: readahead returned %d\n", > (ret == -1) ? "success" : "failure", ret); > printf(" %s: errno is %d\n", > (errsave == EINVAL) ? "success" : "failure", errsave); > close(fd[0]); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1078894
: 876851