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 158107 Details for
Bug 212203
cannot verify write when using fcntl locks on NFS on GFS
[?]
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.
Reproducer
test_bz212203.c (text/x-csrc), 1.18 KB, created by
Sachin Prabhu
on 2007-06-28 10:47:13 UTC
(
hide
)
Description:
Reproducer
Filename:
MIME Type:
Creator:
Sachin Prabhu
Created:
2007-06-28 10:47:13 UTC
Size:
1.18 KB
patch
obsolete
>#include <stdio.h> >#include <unistd.h> >#include <stdlib.h> >#include <fcntl.h> >#include <sys/types.h> >#include <sys/stat.h> >#include <string.h> > > >int main(int argc, char **argv) >{ > int fd; > char *teststr="Testing 123\n"; > int buflen = strlen(teststr); > char readbuf[buflen]; > int readbytes=0; > struct flock lock; > > lock.l_type = F_WRLCK; > lock.l_whence = SEEK_SET; > lock.l_start = 0; > lock.l_len = buflen; > > > > if( argc < 2 ){ > fprintf(stderr, "Usage: %s <filename>\n", argv[0] ); > exit(1); > } > >// printf("Opening file ... "); > if( ( fd = open( argv[1], O_RDWR|O_CREAT|O_EXCL, S_IRWXU ) ) == -1 ){ > perror("open"); > exit(1); > } >// printf("done\n"); > > lseek(fd, 0, SEEK_SET); >// printf("Locking file ... "); > if( fcntl( fd, F_SETLK, &lock ) == -1 ){ > perror("fcntl"); > exit(1); > } >// printf("done\n"); > > lseek(fd, 0, SEEK_SET); >// printf("Writing to file ... "); > if( write( fd, teststr, buflen ) == -1 ){ > perror("write"); > exit(1); > } >// printf("done\n"); > > lseek(fd, 0, SEEK_SET); >// printf("Reading from file ... "); > if( (readbytes = (int) read( fd, readbuf, buflen ) ) == -1 ) { > perror("read"); > exit(1); > } >// printf("done\n"); > printf("Bytes Read = %d\n", readbytes); > > return 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 212203
: 158107 |
433497