| delorie.com/archives/browse.cgi | search |
| 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:message-id:in-reply-to:references:date:subject | |
| :from:to:mime-version:content-type:content-transfer-encoding; q= | |
| dns; s=default; b=H2LETv9tKaLRjrxSyR/fv1ORtXjO1wYm6EDftruPUfoFEo | |
| cotfXG8LKqP3ZFA3oDBj4/0meJYzp8g/iGeYtC/gDvyp6B5wCqcACVtfiJFb07gU | |
| STZeDcHJAwr47zbvFTO3SuZDW2bnwgjNVnDRsuFm/SPozuvJkrQGT0FAswSFs= | |
| 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:message-id:in-reply-to:references:date:subject | |
| :from:to:mime-version:content-type:content-transfer-encoding; s= | |
| default; bh=yzkQgDmoHMzdepHKkbRe0H0uuNc=; b=O9u/dkyNCXdgOtx0VKqh | |
| NHVaUGuctDw85iOhzLlJoYUbnnkg7PQF5o/m/zDD4qtrLY/o13CKn+5EwA4GfrbJ | |
| AolFH9Z1YSpHooTKd1RxWJejlbPBQkN/9+jC/SBartxcMKWMzbzy1SfrVV77opyU | |
| qLyWynSv+Juk7YUQil6HCLM= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| 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-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-0.6 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 |
| X-HELO: | lb2-smtp-cloud2.xs4all.net |
| Message-ID: | <be0351be5e3aa7b7ba980fc25f9cce0c.squirrel@oude-webmail.xs4all.nl> |
| In-Reply-To: | <55B2B644.8010506@towo.net> |
| References: | <announce DOT 55B1677D DOT 5080303 AT towo DOT net> <63a08c60771faffa23bc1c029235301d DOT squirrel AT oude-webmail DOT xs4all DOT nl> <55B22422 DOT 6000601 AT towo DOT net> <d9ef810e0ad325a9b51f641a10a06f0b DOT squirrel AT oude-webmail DOT xs4all DOT nl> <55B2B644 DOT 8010506 AT towo DOT net> |
| Date: | Sat, 25 Jul 2015 19:03:43 +0200 |
| Subject: | Re: [ANNOUNCEMENT] Update: mintty 2.1.2 |
| From: | "Houder" <houder AT xs4all DOT nl> |
| To: | cygwin AT cygwin DOT com, "Thomas Wolff" <towo AT towo DOT net> |
| User-Agent: | SquirrelMail/1.4.22 |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
>> Hi Thomas,
>>> Maybe setsid() should not be called if fork() fails...
>>> Could you try this please:
>>> if (daemonize && !isatty(0)) {
>>> int pid = fork();
>>> if (pid > 0) exit(0); // exit parent process
>>> if (pid == 0) setsid(); // detach child process
>>> if (pid < 0) {
>>> error("could not detach from caller");
>>> exit(9);
>>> }
>>> }
>> Hint: source code of setsid.c -- util-linux package)
> ... or maybe the parent thread should not exit immediately but wait:
> if (daemonize && !isatty(0)) {
> #include <sys/wait.h>
> int status;
> int pid = fork();
> if (pid > 0) {
> waitpid(pid, &status, 0);
> exit(0);
> }
> setsid();
> }
>
> Can you please try both alternatives?
Hi Thomas,
I found the bug (more or less): it is me (AND you). More will follow soon.
Henri
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |