Sponsored Content
Full Discussion: Creating a Daemon
Top Forums Programming Creating a Daemon Post 78054 by svh on Friday 15th of July 2005 02:23:34 AM
Old 07-15-2005
Creating a Daemon

how to convert a c program into a Daemon.

thanks in advance

svh
 

9 More Discussions You Might Find Interesting

1. Programming

daemon

I want to write background running program. How to use daemon function. Please send me source code. Thanks. (1 Reply)
Discussion started by: bat_oyu
1 Replies

2. Shell Programming and Scripting

is this daemon effiecient???

I just wanted a script to touch my files once a day so they don't get removed once a day from cleaning, however I was wondering if it was the most effiecient method? comments are appreciated! command-prompt>nohup toucher.sh & Toucher.sh #!/usr/local/bin/bash while ((1)) do ... (2 Replies)
Discussion started by: Shakey21
2 Replies

3. Shell Programming and Scripting

Creating a Daemon??

How in the world do you create a daemon and get it to start with a startup script? could someone tell me in detail im going nuts...thanks (1 Reply)
Discussion started by: nmajin
1 Replies

4. Programming

Daemon

i want to write a daemon service which listens the 8080 port and write down all the details in one file. How can i do this ? (2 Replies)
Discussion started by: santosh123
2 Replies

5. Shell Programming and Scripting

créating a daemon under unix

hi i want to create a daemon under unix or linux but i don't really know how so i will be grateful if you provide me links with examples or /andx how to do it thanks (2 Replies)
Discussion started by: student00
2 Replies

6. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

Hi, Can someone help me with creating a bash shell script. I need to create a script that gets a positive number n as an argument. The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies

7. Shell Programming and Scripting

Creating a daemon to run in background

I am trying to create a service to always run and monitor a script that has a tendency to hang, we could not find what is causing it to hang so are in the process of completely reprogramming just about everything, however, that will take upto 6 months. So I need to create this to monitor the... (5 Replies)
Discussion started by: ukndoit
5 Replies

8. Homework & Coursework Questions

Creating a .profile, displaying system variables, and creating an alias

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Here is what I am supposed to do, word for word from my assignment page: 1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies

9. Programming

Daemon process

I wish to make a process run in the background, but only one instance of it, and not many, so when the program is loaded, it has to check whether another instance of the same program is running and if so to exit. How do I do this ? (4 Replies)
Discussion started by: sundaresh
4 Replies
SSL(3)							User Contributed Perl Documentation						    SSL(3)

NAME
HTTP::Daemon::SSL - a simple http server class with SSL support SYNOPSIS
use HTTP::Daemon::SSL; use HTTP::Status; # Make sure you have a certs/ directory with "server-cert.pem" # and "server-key.pem" in it before running this! my $d = HTTP::Daemon::SSL->new || die; print "Please contact me at: <URL:", $d->url, "> "; while (my $c = $d->accept) { while (my $r = $c->get_request) { if ($r->method eq 'GET' and $r->url->path eq "/xyzzy") { # remember, this is *not* recommened practice :-) $c->send_file_response("/etc/passwd"); } else { $c->send_error(RC_FORBIDDEN) } } $c->close; undef($c); } DESCRIPTION
Instances of the HTTP::Daemon::SSL class are HTTP/1.1 servers that listen on a socket for incoming requests. The HTTP::Daemon::SSL is a sub-class of IO::Socket::SSL, so you can perform socket operations directly on it too. The accept() method will return when a connection from a client is available. In a scalar context the returned value will be a reference to a object of the HTTP::Daemon::ClientConn::SSL class which is another IO::Socket::SSL subclass. In a list context a two-element array is returned containing the new HTTP::Daemon::ClientConn::SSL reference and the peer address; the list will be empty upon failure. (Note that version 1.02 erroneously did not honour list context). Calling the get_request() method on the HTTP::Daemon::ClientConn::SSL object will read data from the client and return an HTTP::Request object reference. This HTTPS daemon does not fork(2) for you. Your application, i.e. the user of the HTTP::Daemon::SSL is reponsible for forking if that is desirable. Also note that the user is responsible for generating responses that conform to the HTTP/1.1 protocol. The HTTP::Daemon::ClientConn class provides some methods that make this easier. METHODS
The following methods are the only differences from the HTTP::Daemon base class: $d = new HTTP::Daemon::SSL The constructor takes the same parameters as the IO::Socket::SSL constructor. It can also be called without specifying any parameters, but you will have to make sure that you have an SSL certificate and key for the server in certs/server-cert.pem and certs/server-key.pem. See the IO::Socket::SSL documentation for how to change these default locations and specify many other aspects of SSL behavior. The daemon will then set up a listen queue of 5 connections and allocate some random port number. A server that wants to bind to some specific address on the standard HTTPS port will be constructed like this: $d = new HTTP::Daemon::SSL LocalAddr => 'www.someplace.com', LocalPort => 443; SEE ALSO
RFC 2068 IO::Socket::SSL, HTTP::Daemon, Apache COPYRIGHT
Code and documentation from HTTP::Daemon Copyright 1996-2001, Gisle Aas Changes Copyright 2003-2004, Peter Behroozi This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 164: You forgot a '=back' before '=head1' perl v5.12.1 2008-02-12 SSL(3)
All times are GMT -4. The time now is 06:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy