From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121689 invoked by alias); 25 Jul 2015 17:03:49 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 121679 invoked by uid 89); 25 Jul 2015 17:03:49 -0000 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 Received: from lb2-smtp-cloud2.xs4all.net (HELO lb2-smtp-cloud2.xs4all.net) (194.109.24.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 25 Jul 2015 17:03:47 +0000 Received: from oude-webmail.xs4all.nl ([194.109.26.21]) by smtp-cloud2.xs4all.net with ESMTP id wh3i1q00B0TK8Cq01h3iq1; Sat, 25 Jul 2015 19:03:43 +0200 Received: from 83.162.234.136 (SquirrelMail authenticated user incog) by oude-webmail.xs4all.nl with HTTP; Sat, 25 Jul 2015 19:03:43 +0200 Message-ID: In-Reply-To: <55B2B644.8010506@towo.net> References: <63a08c60771faffa23bc1c029235301d.squirrel@oude-webmail.xs4all.nl> <55B22422.6000601@towo.net> <55B2B644.8010506@towo.net> Date: Sat, 25 Jul 2015 17:03:00 -0000 Subject: Re: [ANNOUNCEMENT] Update: mintty 2.1.2 From: "Houder" To: cygwin@cygwin.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 X-SW-Source: 2015-07/txt/msg00393.txt.bz2 >> 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