From owner-freebsd-hackers Wed Feb 10 18:16:47 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA00986 for freebsd-hackers-outgoing; Wed, 10 Feb 1999 18:16:47 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA00972 for ; Wed, 10 Feb 1999 18:16:40 -0800 (PST) (envelope-from tlambert@usr06.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id TAA02594; Wed, 10 Feb 1999 19:16:30 -0700 (MST) Received: from usr06.primenet.com(206.165.6.206) via SMTP by smtp02.primenet.com, id smtpd002458; Wed Feb 10 19:16:24 1999 Received: (from tlambert@localhost) by usr06.primenet.com (8.8.5/8.8.5) id TAA08700; Wed, 10 Feb 1999 19:16:13 -0700 (MST) From: Terry Lambert Message-Id: <199902110216.TAA08700@usr06.primenet.com> Subject: Re: portability of shm, mmap, pipes and socket IPC To: dillon@apollo.backplane.com (Matthew Dillon) Date: Thu, 11 Feb 1999 02:16:12 +0000 (GMT) Cc: tlambert@primenet.com, kuku@gilberto.physik.RWTH-Aachen.DE, hackers@FreeBSD.ORG In-Reply-To: <199902110114.RAA87339@apollo.backplane.com> from "Matthew Dillon" at Feb 10, 99 05:14:58 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-MIME-Autoconverted: from 8bit to quoted-printable by usr06.primenet.com id TAA08700 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id SAA00981 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > :FreeBSD must maintain and correctly apply at process exit the value of > :sem_adj. See the referenced Solaris man pages for semantic details. > > In other words, you have no idea whether there's a bug or not. This > is more second hand ( or worse ) information. No. It is a bug. SVR4, per SVID III, tracks sem_adj. Those were just the man pages I had handy that you could read. > Look, I don't have a problem with second hand information - but > I do have a problem with it being put out as solid fact when it > isn't. It's one thing to say that there might be a bug, quite > another to start crying wolf over unproven and unresearched > reports. It doesn't do anyone any good to condemn a system > for having a 'bug' when you can't even describe what the bug is! You must be referring th the INN stuff here, since the sem_adj failure when a process core dumps *is* a bug, right? See kern/sysv_sem.c, ~line 689: if (sopptr->sem_op < 0) { if (semptr->semval + sopptr->sem_op < 0) { #ifdef SEM_DEBUG printf("semop: can't do it now\n"); #endif break; } else { And from the man page: sem_op is a negative integer; {ALTER} . If semval is less than the absolute value of sem_op and (sem_flg&IPC_NOWAIT) is false, semop() increments the semncnt associated with the specified semaphore and suspends execution of the calling process until one of the following conditions occur: . semval becomes greater than or equal to the absolute value of sem_op. When this occurs, the value of semncnt associated with the specified semaphore is decremented, the absolute value of sem_op is sub­ tracted from semval and, if (sem_flg&SEM_UNDO) is true, the absolute value of sem_op is added to the calling process's semadj value for the specified semaphore. . The semid for which the calling process is awaiting action is removed from the system (see semctl(2)). When this occurs, errno is set equal to EIDRM, and a value of -1 is returned. . The calling process receives a signal that is to be caught. When this occurs, the value of semncnt associated with the specified semaphore is decre­ mented, and the calling process resumes execution in the manner prescribed in signal(3C). i.e.: "semop: can't do it now" doesn't cut it. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message