<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: a question about share memory in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861827#M721522</link>
    <description>According to the manpage for shmget any process can also access this shared memory segment if it has the proper permissions - so yes, other processes can use it/overwrite it.&lt;BR /&gt;&lt;BR /&gt;For a test trying running it as root and locking it into memory (shmctl) and see if it still gets overwritten.&lt;BR /&gt;</description>
    <pubDate>Wed, 11 Dec 2002 08:41:34 GMT</pubDate>
    <dc:creator>Stefan Farrelly</dc:creator>
    <dc:date>2002-12-11T08:41:34Z</dc:date>
    <item>
      <title>a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861825#M721520</link>
      <description>I am developing a software system on HP9000. Now I encounted a problem. I create a block of share memory, store some important information into it. but sometimes the information is changed automaticly. My program do not do that . Is there some system process change the contain in the share memory. Anyone can answer my question?&lt;BR /&gt;&lt;BR /&gt;Thank you very much!</description>
      <pubDate>Wed, 11 Dec 2002 08:35:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861825#M721520</guid>
      <dc:creator>William Cai_1</dc:creator>
      <dc:date>2002-12-11T08:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861826#M721521</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Ensure that shared memory is sufficient for other programs.&lt;BR /&gt;Some running program may be already accessing the shard memory address segments which your program is using. Try using higher order of shared memory address in your program which can be free.&lt;BR /&gt;regards,&lt;BR /&gt;U.SivaKumar&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Dec 2002 08:41:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861826#M721521</guid>
      <dc:creator>U.SivaKumar_2</dc:creator>
      <dc:date>2002-12-11T08:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861827#M721522</link>
      <description>According to the manpage for shmget any process can also access this shared memory segment if it has the proper permissions - so yes, other processes can use it/overwrite it.&lt;BR /&gt;&lt;BR /&gt;For a test trying running it as root and locking it into memory (shmctl) and see if it still gets overwritten.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Dec 2002 08:41:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861827#M721522</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-12-11T08:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861828#M721523</link>
      <description>thank U.SivaKumar and Stefan Farrelly.&lt;BR /&gt;&lt;BR /&gt;I get the key use ftok function,I think it's unique in the whole system.&lt;BR /&gt;&lt;BR /&gt;I'll try to use shmctl function , But I have to run the program as a common user.&lt;BR /&gt;&lt;BR /&gt;what can I do?&lt;BR /&gt;&lt;BR /&gt;Is it system process overwrite the share memory?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Dec 2002 08:58:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861828#M721523</guid>
      <dc:creator>William Cai_1</dc:creator>
      <dc:date>2002-12-11T08:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861829#M721524</link>
      <description>how to use shmctl?&lt;BR /&gt;key = ftok("/usr/caiw",'r');&lt;BR /&gt;shmid = shmget(key,SHMSIZE,IPC_CREAT|IPC_EXCL|0666);&lt;BR /&gt;if (shmid == -1){...}&lt;BR /&gt;shmptr = shmat(shmid,0,0);&lt;BR /&gt;&lt;BR /&gt;shmctl(shmid,IPC_STAT?IPC_SET,buff);</description>
      <pubDate>Wed, 11 Dec 2002 09:06:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861829#M721524</guid>
      <dc:creator>William Cai_1</dc:creator>
      <dc:date>2002-12-11T09:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861830#M721525</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use this command to see the information of current active shared memory segments like memory address , owner and permissions  in the system&lt;BR /&gt;&lt;BR /&gt;#ipcs -m&lt;BR /&gt;&lt;BR /&gt;Avoid using those segments shown by the above command in your program.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;U.SivaKumar</description>
      <pubDate>Wed, 11 Dec 2002 09:13:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861830#M721525</guid>
      <dc:creator>U.SivaKumar_2</dc:creator>
      <dc:date>2002-12-11T09:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861831#M721526</link>
      <description>[/home/caiwl]ipcs -m&lt;BR /&gt;IPC status from /dev/kmem as of Wed Dec 11 17:18:29 2002&lt;BR /&gt;T      ID     KEY        MODE    OWNER     GROUP&lt;BR /&gt;Shared Memory:&lt;BR /&gt;m       0 0x41200629 --rw-rw-rw-      root      root&lt;BR /&gt;m       1 0x4e0c0002 --rw-rw-rw-      root      root&lt;BR /&gt;m       2 0x4124037b --rw-rw-rw-      root      root&lt;BR /&gt;m   44003 0x2ee8af94 --rw-r-----    oracle       dba&lt;BR /&gt;m   41004 0x0001e243 --rw-rw-rw-   tuxdman       app&lt;BR /&gt;m    8005 0x00000000 --rw-------   tuxdman       app&lt;BR /&gt;m   12006 0x64203cec --rw-rw-rw-      root       sys&lt;BR /&gt;m    2007 0x6b203cec --rw-rw-rw-      root       sys&lt;BR /&gt;m    2008 0x000003e8 --rw-rw-rw-   tuxdman       app&lt;BR /&gt;m   21009 0x7a203cec --rw-rw-rw-     caiwl     users&lt;BR /&gt;m    4010 0x78203cec --rw-rw-rw-   tuxdman       app&lt;BR /&gt;&lt;BR /&gt;my key is 0x64203cec and 0x6b203cec,I think is unique in the system. &lt;BR /&gt;:'(</description>
      <pubDate>Wed, 11 Dec 2002 09:20:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861831#M721526</guid>
      <dc:creator>William Cai_1</dc:creator>
      <dc:date>2002-12-11T09:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861832#M721527</link>
      <description>It's rather improbable that an unrelated process will use the same key to get a handle to your shared memory segment. Most likely, an old instance of your process is running and messing up your shared memory.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Dec 2002 09:33:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861832#M721527</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2002-12-11T09:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: a question about share memory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861833#M721528</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Iam not a expert in calls.&lt;BR /&gt;&lt;BR /&gt;try changing the permission of your program shared memory segment to rw----- &lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;U.SivaKumar</description>
      <pubDate>Wed, 11 Dec 2002 09:33:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-question-about-share-memory/m-p/2861833#M721528</guid>
      <dc:creator>U.SivaKumar_2</dc:creator>
      <dc:date>2002-12-11T09:33:42Z</dc:date>
    </item>
  </channel>
</rss>

