Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Wed, 22 Aug 2001 12:18:06 +0400 From: egor duda X-Mailer: The Bat! (v1.53 RC/4) Reply-To: egor duda Organization: deo X-Priority: 3 (Normal) Message-ID: <16746690287.20010822121806@logos-m.ru> To: Kazuhiro Fujieda CC: cygdev Subject: Re: rxvt pops up console with 2001-Aug-07 shapshot In-Reply-To: References: <20010814140130 DOT A26049 AT redhat DOT com> <20010815125949 DOT A768 AT dothill DOT com> <20010816010713 DOT A26439 AT redhat DOT com> <20010821222132 DOT A27443 AT redhat DOT com> <20010822091749 DOT I17561 AT cygbert DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! Wednesday, 22 August, 2001 Kazuhiro Fujieda fujieda AT jaist DOT ac DOT jp wrote: >>>> On Wed, 22 Aug 2001 09:17:49 +0200 >>>> Corinna Vinschen said: >> Kazuhiro, did you find your original problem only with inetd >> and cygrunsrv or even when the process has been started by >> SRVANY??? KF> My original problem is that sshd and inetd can't work without KF> the console window when I execute it not as a service but as an KF> normal application. KF> For example, if you execute sshd via the startup shortcut, the KF> console window pops up and remains until it is terminated by KF> SIGTERM. If you execute it on a shell prompt and terminate the KF> shell, the console window of the shell also remains. i use this simple program in such cases. #include #define TITLESIZE 1024 int main (int argc, char** argv) { HWND console; char old_title [TITLESIZE]; char new_title [TITLESIZE]; if (!GetConsoleTitle (old_title, TITLESIZE)) return 1; sprintf (new_title, "cygwin.hide.%d", GetCurrentProcessId ()); SetConsoleTitle (new_title); Sleep (40); console = FindWindow (NULL, new_title); SetConsoleTitle (old_title); ShowWindow (console, SW_HIDE); } maybe we can add something like this to cygwin api? besides, cygwin already has console handle, so title stuff won't be necessary. >> Perhaps we should add a switch to cygrunsrv whether it should call >> AllocConsole() or not?!? KF> I think inetd and cygrunsrv shouldn't invoke AllocConsole() and KF> the problem with windows popping up should be solved by Egor's KF> ttyfier. ttyfier is designed to run interactive applications. if you want to run, say, 'net start some_service', which creates new console in case it's not available, it's fine. but if you'll run it with redirected output, e.g 'tfy net start some_service >> service.log', you won't see in service.log what you should normally expect. Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19