| delorie.com/archives/browse.cgi | search |
| DMARC-Filter: | OpenDMARC Filter v1.4.2 delorie.com 562AZ7fF3770344 |
| Authentication-Results: | delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com |
| Authentication-Results: | delorie.com; spf=pass smtp.mailfrom=cygwin.com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 delorie.com 562AZ7fF3770344 |
| Authentication-Results: | delorie.com; |
| dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=HnZgSviT | |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 6A93F3852FCD |
| DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
| s=default; t=1751452505; | |
| bh=xYsOAEvouK6olnpwQmOqGXJ8awF9a6nGafY6MWqW8hI=; | |
| h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: | |
| List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | |
| From; | |
| b=HnZgSviToZ6Z8PSCurX+trPLw0ZL+E3bYRY1TQ7rlrNkJR6RuGI/z7E5rVOcINaFJ | |
| nBIcqbpopdMnnxwDbgs9MOt7z+KaQJTpdJLhX6bD9Y2l+QZD8j3IXVY3NfM3NbjMVX | |
| 9sbqGaRsX9w6i82B6NwColOzq8kW/xsz4jtZ8l3c= | |
| X-Original-To: | cygwin AT cygwin DOT com |
| Delivered-To: | cygwin AT cygwin DOT com |
| DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 2EBED385DDC0 |
| Date: | Wed, 2 Jul 2025 12:34:06 +0200 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: setpgid non-compliance with POSIX? |
| Message-ID: | <aGULHq-ofEHN0G1L@calimero.vinschen.de> |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| References: | <3391453b-7914-a319-fad8-4729610558ea AT jdrake DOT com> |
| <aGJc0nVQ-1v1DqCO AT calimero DOT vinschen DOT de> | |
| <f5748be6-5730-ae25-20af-3ed60be5c100 AT jdrake DOT com> | |
| MIME-Version: | 1.0 |
| In-Reply-To: | <f5748be6-5730-ae25-20af-3ed60be5c100@jdrake.com> |
| X-BeenThere: | cygwin AT cygwin DOT com |
| X-Mailman-Version: | 2.1.30 |
| List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
| List-Unsubscribe: | <https://cygwin.com/mailman/options/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
| List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
| List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
| <mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
| From: | Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com> |
| Reply-To: | cygwin AT cygwin DOT com |
| Cc: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
| Errors-To: | cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com |
| Sender: | "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com> |
On Jun 30 12:07, Jeremy Drake via Cygwin wrote: > On Mon, 30 Jun 2025, Corinna Vinschen via Cygwin wrote: > > > On Jun 28 12:32, Jeremy Drake via Cygwin wrote: > > > I was looking at setpgid yesterday, and it seems deficient with respect to > > > the errors required to be returned by the POSIX docs in > > > https://pubs.opengroup.org/onlinepubs/9799919799/functions/setpgid.html > > > > > > Basically, it seems that setpgid allows any arbitrary positive integer to > > > be set as pgid, rather than restricting to setting it to either the > > > process's pid or to an existing pgid in the same session (sid). > > > > Yeah, error checking in setpgid is a bit on the lacking side. With only > > minor changes, the function is basically 25 years old :} > > The POSIX docs metioned that an old BSD allowed setting arbitrary pgid > > > Off the top of my head I don't know how to check the pgid already exists. > > Do you? > > I think it'd have to iterate all processes and check pgid and sid members > of pinfo until it found a match. I'd suggest not to follow up on this for now. We didn't have any problems with this so far. If you like you can create a testcase as a known failure, but a real fix of this without OS support is a lot of work with a questionable gain. Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |