This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Inetd and (detached) background (console) processes


On 20 Jan 2001 13:44:18 +0200, Jari Aalto wrote:
> 
>     In win98 the Inetd can be started from the start directory, but obviously
>     I don't want to draw a shortcut there because it would create that additional
>     window.
> 
>     Now:   run-nw inetd   does not create additional window, but If I put this
>     command to a bat file, the bat file would create extra window...
> 
>     How do I start inetd without extra window in Win98 at PC boot time?

Hello Jari, I have good memories of you from my first Emacs days.

1. inetd opens a console windows because it was not compiled with the
   -mwindows switch. I suggest that daemons will be STANDARDLY compiled
   with this switch, so no visible window is produced (when you start
   such a program from the bash prompt it works exactly the same as a
   program without this switch). You can see the program in `ps' and
   you can send it signals with `kill' like any other Cygwin program.

2. To start programs on the win98 at start up time, you have 2 options:
   2.1 User programs (those are started only after a user is logged in)
     create a shortcut in <Windows Dir>/start menu/programs/startup and
     change the "Target" (by changing its properties) to whatever
     command you want (e.g. "c:\cygwin\usr\local\bin\run-nw.exe inetd").

   2.2 Service programs. These are run even before the user logs in.
     They must be set by editing the registry (since you want only
     to add or change keys, NOT delete, it can be done by a REG file,
     see example below). The key must be added under 
           HKLM\Software\Microsoft\Windows\CurrentVersion\Run
     or    HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices
     (I don't know what is the real difference between them).
     You add key of the form: "description-id"="command to run"
     All escaping is done UNIX style (i.e \\, \").
       
Note. You can use Cygwin's regtool (in bash script).

Ehud.


Example of REG file (inetd.reg) for running inetd at start up without
visible window (for Win9X). It must be a DOS text file (\r\n for EOL).

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
"CygwinInetd"="\"C:\\cygwin\\usr\\local\\run-nw.exe\" inetd"


-- 
 @@@@@@ @@@ @@@@@@ @    @   Ehud Karni  Simon & Wiesel  Insurance agency
     @    @      @  @@  @   Tel: +972-3-6212-757    Fax: +972-3-6292-544
     @    @ @    @ @  @@    (USA)  Fax  and  voice  mail:  1-815-5509341
     @    @ @    @ @    @        Better     Safe     Than     Sorry
 http://www.simonwiesel.co.il    mailto:ehud@unix.simonwiesel.co.il

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]