From owner-freebsd-arch Thu Mar 7 17:11:12 2002 Delivered-To: freebsd-arch@freebsd.org Received: from albatross.prod.itd.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by hub.freebsd.org (Postfix) with ESMTP id B76CA37B405 for ; Thu, 7 Mar 2002 17:11:07 -0800 (PST) Received: from pool0078.cvx21-bradley.dialup.earthlink.net ([209.179.192.78] helo=mindspring.com) by albatross.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16j8uI-0000Mw-00; Thu, 07 Mar 2002 17:10:50 -0800 Message-ID: <3C880F87.62D81504@mindspring.com> Date: Thu, 07 Mar 2002 17:10:31 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Julian Elischer Cc: Nate Williams , Poul-Henning Kamp , arch@FreeBSD.ORG Subject: Re: Contemplating THIS change to signals. (fwd) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Julian Elischer wrote: > > > My suggestion is to stop making STOP type signals an exception, > > > because it should not be necessary to stop them in the middle of a > > > syscall, just stop them from getting back to userspace. > > > > What about when you suspend a process in the middle of read/write, which > > are syscalls? This kind of behavior is *extremely* common-place. > > of course > The question, is, can you tell the difference between the case where > the proces is suspended at the user boundary and where > the process is doing it's sleep? (Considering that immediatly after the > sleep finishes, it's going to abort the syscall and go to the user > boundary because of the signal). Put this way, it's the correct thing to do, if it makes life easier for the KSE stuff. It wasn't clear to me that you were actually aborting the call, rather than allowing it to run to completion, and then delivering the signal, at least from your text description... It also wasn't clear to me that the patch did what you say it does. In particular, I wondered if it did the right thing in the system call restart case (SA_RESTART in the sa_flags). It would be real annoying to be almost done with something, and have to restart it, and it would be equally annoying to be partially done with a write, and have it interrupted, leaving the written object in an indeterminate state. If you can vouch for the SA_RESTART case, and for the case that Nate contemplated (long running call suspended and restarted, rather than interrupted), then it passes the filters I care about. Nate probably cares more about the "suspend long call in the middle, with the intent to resume, but the resume is interrupted, and never happens" case for things like sendfile. I think the problem there is that it results in the state of the connection being indeterminate, so it is hard or impossible to pick up in the middle in the restart case, and guarantee that the data sent down the connection isn't duplicated/omitted. In other words, an HTTP client in an indeterminate state getting a sendfile from a server could make it so that the server has to know to abandon the connection, where with the current code, it can pick up where it left off. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message