- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Shareable writing into file
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
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
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
10-01-2013 11:22 PM
10-01-2013 11:22 PM
Hello.
I need to write in a log file from several processes.
I am using the next solution:
int logFile; logFile = open(stampedPath.ptr, O_WRONLY | O_APPEND | O_CREAT, 0666); write(logFile, buffer.ptr, buffer.len);//to achieve atomic output close(logFile);
In Linux(Red Hat) it works perfectly.
On OpenVMS I've got the next message in the second process: file currently locked by another user.
I've read about fwrite with additional keys from c language extension, but it is queit hard to find out in google full manual for this keys.
Furthermore:
- I am not shure that in this case family of printf functions will give atomic output (in Linux they allow for a processes to mix output).
- I dont want to duplicate the code.
Could I resolve this situation with open/write/close using?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2013 11:30 PM
10-01-2013 11:30 PM
Re: Shareable writing into file
I've got some hurry with it. I've found the post with linked issue.
If the problem and the solution is identical I'll delete this one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2013 12:52 AM