LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-15-2005, 02:07 PM   #1
thekonqueror
LQ Newbie
 
Registered: Aug 2005
Location: Outside the matrix
Distribution: RHEL 4
Posts: 8

Rep: Reputation: 0
Exclamation Daemon Template


I am using a daemon template from http://shearer.org/en/daevel/

This daemon is simple, it listens on a port, and returns back whatever it gets on he port. If we enter 1, our connection is closed.

Now, I have tried to modify it, so that when I enter 2, it will issue a command, say wall. I did this with system("wall hi"); When I compile with this, the code gets executed well, when I enter 2, the daemon issues wall command, but then kills the child process, and due to that, my connction is closed.

In man system, it is said that system disables all forks. What shall I do, to execute some command from the daemon, without getting the client connection closed?


Last edited by thekonqueror; 08-17-2005 at 01:09 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Template class with a template member... Nicholas Bishop Programming 3 02-21-2005 08:27 PM
user template bogus__13 Linux - General 5 01-21-2005 01:25 AM
template class ckcheung0927 Programming 3 11-28-2004 03:59 PM
c++ template help ashirazi Programming 4 11-16-2004 08:52 AM
C++ Template question deiussum Programming 11 09-24-2004 08:26 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration