- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Problem while using fcntl
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО03-04-2009 12:50 AM
тАО03-04-2009 12:50 AM
I am facing some problem while using fcntl crtl call in my program.
***********************************************
Program:
void main()
{
int fd, rc;
struct flock lockdetails;
fd = open ("TEST.DAT", O_CREAT|O_RDWR, 0777);
if (fd == -1)
perror("fopen");
memset(&lockdetails, 0, sizeof(lockdetails));
lockdetails.l_type = F_WRLCK;
lockdetails.l_whence = SEEK_SET;
lockdetails.l_start = 0;
lockdetails.l_len = 0;
rc = fcntl(fd, F_SETLKW, &lockdetails);
if (rc == -1)
perror("fcntl");
close(fd);
}
***********************************************
When I run above program, I got following output:
fcntl: function not implemented
Could you help me to know, is there anything wrong in my program or locking feature is not yet implemented within fcntl.
Regards,
ajaydec
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 01:40 AM
тАО03-04-2009 01:40 AM
Re: Problem while using fcntl
Found this
$ DIR SYS$COMMON:[SYSHLP.EXAMPLES.UCX]UCX$IOCTL_ROUTINE.C
However, ensure if you are using a system that has the non-functional
ioctl in the DEC RTL that you do (e.g. OpenVMS 7.1 without some of the
later RTL patches)
$ cc/prefix=(all,except=ioctl)
otherwise you will pick up the non-functioning routine in the RTL, not
the one in ucx$ioctl_routine.c
fwiw
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:26 AM
тАО03-04-2009 05:26 AM
Re: Problem while using fcntl
OpenVMS (TM) Alpha Operating System, Version V8.2
$ DIR SYS$COMMON:[SYSHLP.EXAMPLES.UCX]UCX$IOCTL_ROUTINE.C
%DIRECT-E-OPENIN, error opening SYS$COMMON:[SYSHLP.EXAMPLES.UCX]UCX$IOCTL_ROUTINE.C;* as input
-RMS-E-DNF, directory not found
-SYSTEM-W-NOSUCHFILE, no such file
I didn't find any UCX directory under SYS$COMMON:[SYSHLP.EXAMPLES]
Regards,
ajaydec
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:26 AM
тАО03-04-2009 05:26 AM
Re: Problem while using fcntl
Exactly. It fails on my Alpha system (VMS
V7.3-2), and appears to work on my IA64
system(VMS V8.3-1H1).
alp $ cc fl
alp $ link fl
alp $ run fl
fcntl: function not implemented
alp $
it $ cc fl /obj = fl_i
it $ link fl_i
it $ r fl_i
it $
I suspect that there was something somewhere
in the release notes about this.
These help, by the way:
#include
#include
#include
#include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:29 AM
тАО03-04-2009 05:29 AM
Re: Problem while using fcntl
Don't worry about it. That's old stuff, and
ioctl() is not fcntl().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2009 05:34 AM
тАО03-04-2009 05:34 AM
Solutionhelpful, too. Compare, for example:
http://h71000.www7.hp.com/doc/82final/5763/5763pro_029.html#index_x_800
http://h71000.www7.hp.com/doc/83final/5763/5763pro_033.html#index_x_888
Only one mentions "File Locking".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-05-2009 02:12 AM
тАО03-05-2009 02:12 AM
Re: Problem while using fcntl
fcntl is working on OVMS 8.3 and not OVMS 8.2 might be its not implemented on 8.2
Regards,
ajaydec