- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- fcntl system call
Operating System - HP-UX
1824363
Members
3127
Online
109669
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2008 09:49 PM
04-06-2008 09:49 PM
fcntl system call
Hello everyone,
could you please explain how to use fcntl system call with optins like F_SETFL and to set and reset the flags O_RDONLY.
could you please explain how to use fcntl system call with optins like F_SETFL and to set and reset the flags O_RDONLY.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2008 02:34 AM
04-07-2008 02:34 AM
Re: fcntl system call
Take a look at the man pages:
http://docs.hp.com/en/B2355-60130/fcntl.2.html
http://docs.hp.com/en/B2355-60130/fcntl.5.html
Unfortunately the documentation is pretty poor in that I have no idea of the difference between "file status" vs "file descriptor".
Searching this inter-web thingy shows it is a file status.
http://www.informit.com/articles/article.aspx?p=99706&seqNum=13
int status, status1;
// get initial file status bits
status = fcntl(fd, F_GETFL, 0);
// set read only
status1 = fcntl(fd, F_SETFL, status & ~O_ACCMODE | O_RDONLY);
// set read write
status1 = fcntl(fd, F_SETFL, status & ~O_ACCMODE | O_RDWR);
http://docs.hp.com/en/B2355-60130/fcntl.2.html
http://docs.hp.com/en/B2355-60130/fcntl.5.html
Unfortunately the documentation is pretty poor in that I have no idea of the difference between "file status" vs "file descriptor".
Searching this inter-web thingy shows it is a file status.
http://www.informit.com/articles/article.aspx?p=99706&seqNum=13
int status, status1;
// get initial file status bits
status = fcntl(fd, F_GETFL, 0);
// set read only
status1 = fcntl(fd, F_SETFL, status & ~O_ACCMODE | O_RDONLY);
// set read write
status1 = fcntl(fd, F_SETFL, status & ~O_ACCMODE | O_RDWR);
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP