X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:reply-to:to:subject:date:message-id :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=Fj25HwsOB+ariJvBGn2bJiBoN5ar7M6+Hw+YLQWDAL42h1JReelKp 7+UlZqg5i8w4GFjtzLjFteWoahq0QWC6IjK+9Xjncz9kysMtJNRh0rD+c8DP0bXY JUauQl8EA+6X6u1HB2LnYB2uWGKXdSqLEt4EWO0wJWgHwc0nqXG/bA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:reply-to:to:subject:date:message-id :content-type:content-transfer-encoding:mime-version; s=default; bh=adzufVKWOXvKgeWnPRShjjtcYPA=; b=MNF1U0INzWi+WoJ3CAwcrGcEZTib Q+l4p65VRje40JrKVJv46ll4NoxjkzNw14vvc+PTIVQbL8mnTZvfUMgjKB/z3Aag rXOUQwAWnUlTpZHPBoS4JDTg2c4GVAS/AZUd+Rgrglm8gz3BWlzD9j7MwDM5n2ZI CHl7fgjxN7MgCJA= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=screw, insane, thousands, intensive X-HELO: nihcesxwayst06.hub.nih.gov DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nih.gov; i=@nih.gov; q=dns/txt; s=NIH; t=1565200859; x=1596736859; h=from:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=b9SsejID8Uk3+yfG6Ym/XOsAyZx7SFzLZNXcWUyFjXU=; b=GU7VHUNvsWZXuHANd0sGfuH/uIcmmz110YF4IPFb3RjsGjCu9oPqB4KZ kP+On7preK3K+Mxit6/bFC+kWfcPTPDA/xThNvP4DSqmhVD8j1RZrnPbU dOxykf2rAIEQcu8L9NijXCmM/VMsVFuplNDNJpKJchhfUWpRGfpDtaYMx YSnDjENQRlqZvAw4UuHJTg9W8hmqrG48wtGGK8emJU0n1Amqcz3dEjR6X 8oNNsRGNP9FXv7q+YVPzRGrdhBL6vJ6ITrBsyyH8ZosHHSA7o7aXH07aA Oa7wQzG8cJHWm4S0kJQb9kw3/tNg+SFGF89IOK8x9aj8/GAFzOwq21/MM w==; IronPort-SDR: njGz/iu4lcMnvBlRqKiMIKc0cFjf9vcF0qLeTCJVRSrxEY2tA14QdGS9hRdP/6Nszqi3rmCSGv 4wSfRThz18Gg== ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GzPOQn+nLUngqPwPKK1k8gvJdmDO0lS/Sv0PORBfldR4A3dc8cT37WT1WU8FGD4o8kDW6ggpk6QzDB3PASrZT+k2/CGYRqeBzdd53rO0qlvUHjE9TrWMAfU/IMuoRJx05ssbYyZPKm1nVy7Klr+WpDuZcKfEerdgppasenAWSPxcgu9zAFZ8vCoF3cjBWM83HrFPvpLMb4jKwv0bIYleJate3eHkwn1Jqgmq19FgJzzvw5is17OiMa2JBzyX8cVdRB4fxVOAaDxOYufnbetvMG3laTJozra16ItKIT4Sq1ds5qmbgruoAAW8pPcbVogoN0NQ2+W4EMiMuroIQX0XFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b9SsejID8Uk3+yfG6Ym/XOsAyZx7SFzLZNXcWUyFjXU=; b=TB5mGcV7isLXdlS1B5usLQCmqvkAYO2IsvRoCONgYUK7uU5wqBwA4EgmBHVXanoqJY4LAg18/Lsy+5zMNu0WlV8nTKl3/hBKaAicNF60mfuzK12zbejK8S4kqx3PAL+Pz3l+eELVByIGANkf7aNNGTyAtf87PqVGRwlKML68ZcKqxte6uI4T+1N53yZn7NgqXiJ7OpnkheQKcVNPG8slW5AtqGcexB7RM5UGOhI2Yv5j2oBajsCSx7vP7YoQybC/l6tCZLXtwOXloGjm8Cllhy3LAJa4f8t2G6gtcgreW2rlraKrv96EdIabo/BcmA1M0LcYxvPcmK4kG5ZRt6v5Dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ncbi.nlm.nih.gov; dmarc=pass action=none header.from=ncbi.nlm.nih.gov; dkim=pass header.d=ncbi.nlm.nih.gov; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nih.onmicrosoft.com; s=selector1-nih-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b9SsejID8Uk3+yfG6Ym/XOsAyZx7SFzLZNXcWUyFjXU=; b=d8S8CwxsVTwqboL6RygKMh9B1Nwx4U12rJBffmfMH10XK98EEYCjQSCD5zP++YGNu+Bs4WVqSe5ocShlrVEnTFSauiooyyf5mZuFIWu6pn6XwzreXqsdsytDV9AGjsT7nnxgxSqPOKeRD2EDd5jC/tLfOA6plsddxPhTfwzDTdY= From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin" Reply-To: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" To: "'cygwin AT cygwin DOT com'" Subject: Re: semget() returns EAGAIN? Date: Wed, 7 Aug 2019 18:00:46 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=lavr AT ncbi DOT nlm DOT nih DOT gov; x-ms-oob-tlc-oobclassifiers: OLM:318; x-ms-exchange-senderadcheck: 1 x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: f5TmENpGFchDTlER34pCJDRy61N/Xuscs80JiSByOJTEzXqXx3KRFNIRpZBuhP4Q Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x77I1c6L019103 > The number of parallel open pipes, for instance. By default, 10 > worker threads handle the load and up to 62 processes can be handled > in parallel. Hmm, so it is not an OS-imposed restriction... Then I don't understand why it wasn't made to "just work": to create a thread per client until that works, without having to have any pre-set limits. Fail only if the thread creation cannot be done. > Apart from that, the preferred way to use semaphores is to use POSIX > semaphores, that is, sem_open and friends. Well, that's not entirely up to me, the app is already using (quite stably!) SYSV semaphore _arrays_ so switching to POSIX would require some porting (and intensive bug checking -- provided that the app is being used on thousands of hosts). Besides, TBH it looks like the POSIX-devising people were smoking some kind of weed when coming up with sem_timedwait() using _absolute_ timeouts! That's way too insane. They also tried to screw up SYSV sems by saying they get created not necessarily initialized (what's the point?! it totally defeats the purpose!) TG, by then many systems had already had them implemented decently (reset to 0 upon inception), so that "clause" did not have any chance to actually realize. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple