X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=1.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <20100212214239.HOJZ4.150765.root@hrndva-web25-z01> Date: Fri, 12 Feb 2010 16:42:39 -0500 From: To: cygwin AT cygwin DOT com Subject: Creating a separate console window via CreateProcess MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sensitivity: Normal X-IsSubscribed: yes 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 I am building a application using the latest tools available via the cygwin setup program. The application is supposed to open a separate DOS console window, but all processing seems to occur within the context of the DOS console window where I execute the program. I have cut the program down to the code that just does the process creation. I would want the following program to open a separate DOS window to ask me for a password for the rexec command. I built the test program with: gcc -mno-cygwin creprc.c -o creprc Could someone help me understand what I am doing wrong? -Jeff #include #include #include main() { char buffer[128]; STARTUPINFO start; PROCESS_INFORMATION child; strcpy (buffer, "rexec testhost -l testuser testcommand"); memset (&start, 0, sizeof (start)); start.cb = sizeof (start); start.dwFlags = STARTF_USESHOWWINDOW; start.wShowWindow = SW_NORMAL; memset (&child, 0, sizeof (child)); if (CreateProcess (NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &start, &child)) { CloseHandle (child.hThread); CloseHandle (child.hProcess); } } -- 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