Sponsored Content
Top Forums Shell Programming and Scripting communication between shell and and a demon 'c' program Post 302541494 by jim mcnamara on Sunday 24th of July 2011 11:27:18 PM
Old 07-25-2011
There are ways to do this from the daemon:
1. write to a known memory location in a given process - like a message queue or shared memory.
2. write to a named pipe or to a given filename

The is nothing you can do in shell by itself; you have to seriously rewrite the daemon.
 

10 More Discussions You Might Find Interesting

1. Programming

Communication between a java and c++ program

Hi, I have the following problem. I have 2 programs, a java program and a c++ program. These 2 programs have to communicate with each other in full duplex mode. I want to use pipes for this communication. So when the c++ program pust something on the stdout the java program must be able to read... (4 Replies)
Discussion started by: lmnt22
4 Replies

2. Shell Programming and Scripting

perl demon how to ?

Hello im kinda new to perl programming in unix i need to make some kind of perl demon that sites and waits to see if there is files in the dir if there is complete file ( not part of it ) , I need to mv it to different dir ok so the easy parts to cp files and perl I know , but how the hell... (1 Reply)
Discussion started by: umen
1 Replies

3. Shell Programming and Scripting

help with shell program

I want to print the value of variables a1, a2, a3 in for loop in the following program: a1=this a2=is a3=printed for((i=1;i<4;i++)) do var=a$i #w=`echo $var` e=${var} echo $e done But actually I get a1,a2,a3 as the output not the "this is printed" So the main question is if I... (3 Replies)
Discussion started by: adgarg
3 Replies

4. OS X (Apple)

Serial Communication from shell Mac OS X PHP script

Hi again, I spoke with Keyspan and they assured me the USB to Serial device was working if I could use the Screen tool. I asked why I was unable to redirect stdin/stdout to and from the /dev/tty. device and was told there was no reason I shouldn't be able to do so. I have tried: ... (1 Reply)
Discussion started by: cpfogarty
1 Replies

5. Programming

C program using IPC (inter process communication)

i want to write a C chat program that communicates over IPC(inter process communication), that could be run using 2 seperate terminal windows within the same computer. so that wat u type in one terminal window , should appear on the other and vice versa... could some one please help me with the... (2 Replies)
Discussion started by: localp
2 Replies

6. Shell Programming and Scripting

dilemma what to use c++ or script for demon process

Hello all i need to implement demon that needs to extract data from db load the data to memory and according to this data to perform actions like sending emails or write/update files this action needs to be preformed each 30 min's now i really don't know what to decide or to compile c++... (5 Replies)
Discussion started by: umen
5 Replies

7. OS X (Apple)

Inter-shell communication

If I open two bash shells and telnet from Shell 2 to a remote server (on the Net), is there a way to direct input from Shell 1 to the telnet shell? The telnet shell is a limited environment with a specific command set. I want to direct commands from Shell 1 and, if possible, put 1-second... (2 Replies)
Discussion started by: xinUoG
2 Replies

8. Homework & Coursework Questions

Shell program in C

Hi all, I have an assignment from school to write a shell program in linux. the idea is to exercise fork() and execv() functions.. the shell program is supposed to be the master and every command that the user prints will run in a new process. we also need to try running the command in every... (1 Reply)
Discussion started by: r3vive
1 Replies

9. UNIX and Linux Applications

emacs gnus-demon not running

My understanding of the gnus-demon is that it should run its handlers each gnus-demon timestep. I have my gnus demon timestep set to the default 60 seconds. I have registered one handler that prints something out every time it is called (and is supposed to update the group buffer). However, the... (0 Replies)
Discussion started by: making
0 Replies

10. Shell Programming and Scripting

Communication between different hosts through shell scripts.

1) I have two scripts named as a.sh,b.sh running two different hosts host1 and host2 2) So now how to execute b.sh on host2 from a.sh on host1 3) Also I have few queries regarding the same as I want to execute few commands with sudo and with different user in script b.sh so how this can be... (2 Replies)
Discussion started by: RSC1985
2 Replies
writesrv(8)						      System Manager's Manual						       writesrv(8)

NAME
writesrv - Lets users send messages to and receive messages from a remote system. SYNOPSIS
/usr/sbin/writesrv DESCRIPTION
The writesrv daemon allows users to send messages to users on a remote system, and to receive responses from users on a remote system with the write command. The writesrv command receives incoming requests from a write command and creates a server process to handle the request. This server process communicates with the client process (write) and provides whatever services are requested. To perform these services, the writesrv daemon creates a socket on the port defined in the /etc/services file. All requests for service go as messages to this socket. STARTING AND STOPPING writesrv. You can cause the writesrv daemon to be started during system boot with /sbin/init.d/write. The writesrv daemon starts automatically if the WRITESRV variable is defined properly in /etc/re.config. To start writesrv automatically during system boot, do the following as superuser. rcmgr set WRITESRV yes To prevent writesrv from starting automatically during system boot, do the following as superuser: rcmgr set WRITESRV no By default, writesrv is not set and therefore /usr/sbin/writesrv does not run. You can start the writesrv daemon manually as follows: /sbin/init.d/write start You can stop writesrv manually as follows: /sbin/init.d/write stop NOTES
If the writesrv daemon terminates abnormally (that is, for a system crash, a power failure, or the kill -9 command), someone must manually clean out the /usr/spool/writesrv directory to remove any files left behind. RELATED INFORMATION
Commands: write(1) Files: services(4) delim off writesrv(8)
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy