Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com Message-ID: <380-2200464318591812@hedden.us> Reply-To: jdhedden@1979.usna.com From: "Jerry D. Hedden" To: cygwin@cygwin.com Subject: BUG: More shmget() problems Date: Thu, 3 Jun 2004 14:59:01 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=iso-8859-1 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id i53Iv73H005125 The following test program: #include #include int main(int argc, char **argv) { int pid = fork(); int id; if (pid == 0) { sleep(5); id = shmget(1, 100, IPC_CREAT | 0666); printf("child (%d): %d (%d)\n", getpid(), id, errno); } else { id = shmget(1, 100, IPC_CREAT | 0666); printf("parent (%d): %d (%d)\n", getpid(), id, errno); sleep(10); shmctl(id, IPC_RMID, 0); } return (0); } Produces: parent (6592): 720896 (0) child (28268): 1638401 (0) Showing that the child process created its own segment instead of begin given the parent's segment. This is a bug. ===== Jerry D. Hedden << If you're not having fun, then you're not doing it right! >> -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/