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: 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-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: In-Reply-To: <55B2B644.8010506@towo.net> References: <63a08c60771faffa23bc1c029235301d DOT squirrel AT oude-webmail DOT xs4all DOT nl> <55B22422 DOT 6000601 AT towo DOT net> <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" To: cygwin AT cygwin DOT com, "Thomas Wolff" User-Agent: SquirrelMail/1.4.22 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 > 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