Re: How to start a Server prog written in C (using sockets) to start at bootup



rajanyadav wrote:
How to start a Server prog written in C (using sockets) to start at
bootup. I tried adding script to rc5.d? But the problem is that since
the server starts listening on a port( 5000) the OS freezes and then I
have to bootup in rescue mode to remove that script.

All the script does is runs a program calle server written in C.

In the script I have followed the start, stop status pattern followed
in other rc5.d scripts.



The scripts in the rc directories are set up for controlling
C programs which are specifically written to run as daemons.

You cannot start a simple terminal-oriented program and
assume that it behaves as a proper daemon.

For details, get e.g. the book

W Richard Stevens, Advanced Programming in the UNIX
Environment

and read the chapter on daemons (and all others referred
from it).

--

Tauno Voipio
tauno voipio (at) iki fi
.



Relevant Pages

  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script Runs perfectly fine from the command prompt. ... # This is the main Apache HTTP server configuration file. ... LoadModule actions_module modules/mod_actions.so ...
    (perl.beginners)
  • Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: Regarding a selection for mobile code/scripting language
    ... Client Side scripting, so the server can send script commands to the client. ... I decided they should be scripted and mobile code. ...
    (Vuln-Dev)
  • Re: HTTPSConnection script fails, but only on some servers (long)
    ... (HTTP/CONNECT + switch to HTTPS) ... wget and my python script. ... >>The python script works with server A, ... the problem seems to depend on both the client ...
    (comp.lang.python)