public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Feature request:  inetd as a service on win98
@ 2001-09-07  5:10 Habermann, David (DA)
  2001-09-07  6:39 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Habermann, David (DA) @ 2001-09-07  5:10 UTC (permalink / raw)
  To: 'Corinna Vinschen'

>On Fri, Sep 07, 2001 at 10:10:45AM +0200, Gerald Villemure wrote:
>> In other words run inetd as a true service in win98 such that I can login
>> and logout without affecting the inetd process.  Somewhat like the VNC
>> server dose.
>> 
>> One option perhaps would be to introduce a new command in cygwin to hide
a
>> window based on PID with the option to also detach it from the session so
>> the person can log out without a dialog popping up saying you need to
close
>> all your apps first.
>
>Just a question:  Why don't you contribute such a solution to
>our community driven open source project called Cygwin?

In case it helps, I found that addition of the following code bit
(originally 
found as part of the VNC project) to SSHD allows it to detach from the DOS 
window in which it was running, allowing the DOS window to be closed 
on Win98.  Sorry that I'm not providing this in the standard patch form, but

no one has ever taught me how to create one.

List of source modifications to sshd.c

****************************************************************************
****

#include "authfile.h"
#include "windows.h" /* DAH modification to add FreeConsole */

****************************************************************************
****

		if (daemon(0, 0) < 0)
			fatal("daemon() failed: %.200s", strerror(errno));

		/* begin DAH modification to detach and run in background */
    		fflush(stdin);
    		fflush(stdout);
    		fflush(stderr);

    		/* Detach from the console */

    		if (!FreeConsole())
    		{
			debug("failed to detach from console");
    		}
		/* end DAH modification */

		/* Disconnect from the controlling tty. */

****************************************************************************
****

Dave Habermann

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Feature request:  inetd as a service on win98
  2001-09-07  5:10 Feature request: inetd as a service on win98 Habermann, David (DA)
@ 2001-09-07  6:39 ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2001-09-07  6:39 UTC (permalink / raw)
  To: cygwin

On Fri, Sep 07, 2001 at 08:10:45AM -0400, Habermann, David (DA) wrote:
> >On Fri, Sep 07, 2001 at 10:10:45AM +0200, Gerald Villemure wrote:
> >> In other words run inetd as a true service in win98 such that I can login
> >> and logout without affecting the inetd process.  Somewhat like the VNC
> >> server dose.
> >> 
> >> One option perhaps would be to introduce a new command in cygwin to hide
> a
> >> window based on PID with the option to also detach it from the session so
> >> the person can log out without a dialog popping up saying you need to
> close
> >> all your apps first.
> >
> >Just a question:  Why don't you contribute such a solution to
> >our community driven open source project called Cygwin?
> 
> In case it helps, I found that addition of the following code bit
> (originally 
> found as part of the VNC project) to SSHD allows it to detach from the DOS 
> window in which it was running, allowing the DOS window to be closed 
> on Win98.  

FWIW, I think that shouldn't be necessary anymore beginning with
the next Cygwin version.  We got a patch which should do the
FreeConsole() automagically when a process has daemonised itself
using the setsid() call.  Thanks anyway.

> Sorry that I'm not providing this in the standard patch form, but
> 
> no one has ever taught me how to create one.

diff -up oldsource newsource

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Feature request:  inetd as a service on win98
  2001-09-07  1:07 Gerald Villemure
@ 2001-09-07  3:16 ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2001-09-07  3:16 UTC (permalink / raw)
  To: cygwin

On Fri, Sep 07, 2001 at 10:10:45AM +0200, Gerald Villemure wrote:
> I would like of great help if I were able to do this:
> 
> [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
> "CygwinInetd"="c:\\cygwin\\usr\\sbin\\inetd.exe"
> 
> In other words run inetd as a true service in win98 such that I can login
> and logout without affecting the inetd process.  Somewhat like the VNC
> server dose.
> 
> One option perhaps would be to introduce a new command in cygwin to hide a
> window based on PID with the option to also detach it from the session so
> the person can log out without a dialog popping up saying you need to close
> all your apps first.
> 
> If it helps to get started I have found this command line tool to hide a
> window based on its title:
> http://www.tardis.ed.ac.uk/~skx/win/Free6.html

Just a question:  Why don't you contribute such a solution to
our community driven open source project called Cygwin?

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Feature request:  inetd as a service on win98
@ 2001-09-07  1:07 Gerald Villemure
  2001-09-07  3:16 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Gerald Villemure @ 2001-09-07  1:07 UTC (permalink / raw)
  To: cygwin

I would like of great help if I were able to do this:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
"CygwinInetd"="c:\\cygwin\\usr\\sbin\\inetd.exe"

In other words run inetd as a true service in win98 such that I can login
and logout without affecting the inetd process.  Somewhat like the VNC
server dose.

One option perhaps would be to introduce a new command in cygwin to hide a
window based on PID with the option to also detach it from the session so
the person can log out without a dialog popping up saying you need to close
all your apps first.

If it helps to get started I have found this command line tool to hide a
window based on its title:
http://www.tardis.ed.ac.uk/~skx/win/Free6.html

Thanks,
Gerald
--------------------------------------------------------------------
I n t e r K n o w l e d g e
Gerald Villemure
I am a DO-er, not a TRY-er.                  email: GVillemure@ik.ca



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-09-07  6:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-07  5:10 Feature request: inetd as a service on win98 Habermann, David (DA)
2001-09-07  6:39 ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2001-09-07  1:07 Gerald Villemure
2001-09-07  3:16 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).