- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shared memory
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
тАО01-13-2003 06:45 AM
тАО01-13-2003 06:45 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2003 07:58 AM
тАО01-13-2003 07:58 AM
Re: Shared memory
First of all you need to identify if this application is stand-alone (creates and uses its own resources) or if it shares resources with another application.
If the first is true you will need to identify which system call failed and the exit code.
If the second is true and it is trying to share information with one of the windowed applications it will need to join that window to access the information.
For memory windows remember the global window (3rd quadrant) is still the default window for all applications that do not specify which window id to use. So if you are trying to attach to a shared memory segment that is in a unique window and don't specify a window id, this will try to attach to an address in the global window and will fail.
Regards,
James.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2003 10:09 AM
тАО01-13-2003 10:09 AM
Re: Shared memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2003 10:26 AM
тАО01-13-2003 10:26 AM
SolutionIf it's actually a permission problem and you don't have access to the source then you could write a small c program making a shmctl() call to open the permissions on the shmid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2003 10:37 AM
тАО01-13-2003 10:37 AM
Re: Shared memory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2003 12:50 PM
тАО01-13-2003 12:50 PM
Re: Shared memory
Here's my 3-minute C program.
1) cc shm.c -o shm
If you don't have a development C compiler, you can use the bundled compiler but you will need to convert the ANSI functions to K&R.
int main(int argc, char *argv[])
becomes
int main(argc, argv)
int argc;
char *argv[];
problem(char *msg, int err)
becomes
problem(msg,err)
char *msg;
int err;
As is, it will set permissions to 666 but you can change the NEW_PERMS define to anything you like.
2) Run ipcs -ma and determine the shared memory identifier. (The decimal identifier in the 2nd column of ipcs -ma output).
3) shm shmid
ipcs -ma should now display 666 permissions on this shmid.
It took me longer to type this stuff than to do the C.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2003 03:01 PM
тАО01-13-2003 03:01 PM
Re: Shared memory
The C program will need to be run by either the owner of the shmid or root; noone else will have sufficient permissions to do an IPC_SET.
You should man shmctl to see how this works.