delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/03/06/07:18:41

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:to:subject:date:message-id:mime-version
:content-type; q=dns; s=default; b=sqZxHrpuSB6pqfxxzsn04STJPIlDR
EOXxXhXWavWcGw6SKOY/Aj2bRlhZe/+eij4EeHAk02Jk/laD2pZ3BpG570Nr90yh
QiNSUOJv/N/+eJ72AwytOTbega9h82PVYnLMk+RyNnReWt2hXXupECCSJZ+rOiIh
yttuC4oD9qEg3Q=
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:to:subject:date:message-id:mime-version
:content-type; s=default; bh=NotXmcKM9wpD/0Q8viNS0U1t1XA=; b=MZn
ZyXIk2sQsviNza0pAIFV1oYK4Y7DEy+2jIwZGQlrYMgOEJM4QHGKBa9Qzp2ANL+p
tZ360omO98MXQ9Zl40y15WKmFHDVkV4L8g5Oxn6ST0zUKBQFHmjIzShR2U465D1i
kLXUqIi3Z4URWFBSKCjjmmZk43rgCpVk4n8P4PXE=
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.5 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: smtprelay.hostedemail.com
X-Session-Marker: 6A62656E6973746F6E40756B322E6E6574
X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,jon AT beniston DOT com,:,RULES_HIT:10:41:355:379:541:542:871:973:988:989:1000:1155:1260:1308:1309:1313:1314:1345:1437:1516:1518:1534:1538:1568:1575:1587:1594:1711:1714:1730:1747:1764:1777:1792:2110:2393:2559:2562:3138:3139:3140:3141:3142:3865:3866:3867:3868:3871:3872:3874:4184:5007:6506:6747:6748:7281:7909:9977:10004:10394:10400:10848:11604:11658:11914:12517:12519:13071:21060,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0
X-HE-Tag: smash08_2af8600a06f02
X-Filterd-Recvd-Size: 2699
From: "Jon Beniston" <jon AT beniston DOT com>
To: <cygwin AT cygwin DOT com>
Subject: setup-x86.exe exits before installation is complete
Date: Thu, 6 Mar 2014 12:18:19 -0000
Message-ID: <002301cf3936$2a25c7d0$7e715770$@beniston.com>
MIME-Version: 1.0

------=_NextPart_000_0024_01CF3936.2A2615F0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hi,

It seems recent versions of setup-x86.exe exit before the installation is
complete. Without the --no-admin option, the main installation is run as a
child process, and the parent doesn't wait for the child to complete. This
can cause a bit of a problem for other installers that install Cygwin (as
when setup.exe exits, Cygwin isn't installed).

Is something like the attached patch appropriate? It just waits for the
child process before exiting.

Cheers,
Jon


------=_NextPart_000_0024_01CF3936.2A2615F0
Content-Type: text/plain;
	name="patch.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="patch.txt"

Index: main.cc
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/cygwin-apps/setup/main.cc,v
retrieving revision 2.75
diff -u -r2.75 main.cc
--- main.cc	18 Nov 2013 11:16:14 -0000	2.75
+++ main.cc	6 Mar 2014 12:02:16 -0000
@@ -295,6 +295,7 @@
 		sei.lpVerb =3D "runas";
 		sei.lpFile =3D exe_path;
 		sei.nShow =3D SW_NORMAL;
+		sei.fMask |=3D SEE_MASK_NOCLOSEPROCESS;
=20
 		// Avoid another isRunAsAdmin check in the child.
 		std::string command_line_cs (command_line);
@@ -322,6 +323,11 @@
 		  }
 		else
 		  exit_msg =3D IDS_ELEVATED;
+
+        // Wait until child process is finished
+		if (sei.hProcess !=3D NULL)
+		  WaitForSingleObject (sei.hProcess, INFINITE);
+=20=20=20=20=20=20=20=20=20=20=20=20
 		// Once we are set on course to privilege elevate, the parent
 		// process is unnecessary.
 		goto finish_up;


------=_NextPart_000_0024_01CF3936.2A2615F0
Content-Type: text/plain; charset=us-ascii

--
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
------=_NextPart_000_0024_01CF3936.2A2615F0--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019