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 661369 Details for
Bug 856985
Lock migration
[?]
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.
Program to test lock migration.
lock.c (text/x-csrc), 807 bytes, created by
Sachidananda Urs
on 2012-12-11 10:47:27 UTC
(
hide
)
Description:
Program to test lock migration.
Filename:
MIME Type:
Creator:
Sachidananda Urs
Created:
2012-12-11 10:47:27 UTC
Size:
807 bytes
patch
obsolete
>#include <sys/types.h> >#include <sys/stat.h> >#include <string.h> >#include <unistd.h> >#include <fcntl.h> >#include <stdio.h> >#include <err.h> >#include <errno.h> > >int >main(int argc, char **argv) >{ > int fd; > int lret; > char *filename; > > if (argc != 2) { > printf("Usage: %s filename\n", argv[0]); > return 1; > } > filename = argv[1]; > fd = open(filename, O_CREAT|O_RDWR); > if (fd == -1) { > errx(1, "Unable to open %s: %s", filename, strerror(errno)); > } > lret = lockf(fd, F_LOCK, 10); > if (lret == 0) { > printf("Lock succeeded\n"); > getchar(); > } else { > printf("Failed to acquire lock\n"); > } > close(fd); > 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 856985
: 661369