Sponsored Content
Top Forums Shell Programming and Scripting Alternative network messaging? Post 302721601 by DGPickett on Thursday 25th of October 2012 02:53:23 PM
Old 10-25-2012
Yes, kill is named for it's most popular use, termination, but it is just a signal sender.

in shell, trap is the shell signal catcher. SIGINT was available, but for apps SIGUSR1 and SIGUSR2 are most appropriate: Man Page for signal (linux Section 7) - The UNIX and Linux Forums

The signal processing is done out of sequence with the process thread(s), but in the same process so variables are passed.

So, you can push files to input-dir/unique.take-me-extension, the final step being mv and then kill to start the possibly, usually sleeping server so it processes the input.(
Code:
ssh server_host 'cat >input-dir/unique.take-me-extension.tmp
  mv input-dir/unique.take-me-extension.tmp input-dir/unique.take-me-extension
  kill -SIGUSR1 `< server-pid-file`
 ' < input-file

Of course, you have to be the same id or root to signal a process. Named pipes can stall servers that only require the writer have permission on the pipe.
Code:
$ mknod p p
$ ls -lA|grep '^p'
prw-r--r--   1 my_uid    my_group          0 Oct 25 14:54 p
$ while :
do
 cat <p
done &
[1]     19299
$ echo hi >p
$ hi
echo hello >p
$ hello


Last edited by DGPickett; 10-25-2012 at 04:01 PM..
This User Gave Thanks to DGPickett For This Post:
 

6 More Discussions You Might Find Interesting

1. Programming

Instant Messaging App Help

I was hoping someone could assist me on a text-based instant messaging client(using UDP) I am working on. I have the network communication basics already in place but, specifically, needed some further help on the "messaging other users" and "getting a user list" functions. The server code that... (0 Replies)
Discussion started by: AusTex
0 Replies

2. IP Networking

DT messaging could not be started

this id the message i get with a suggestions to check those files: /etc/src.sh /etc/hosts /usr/adm/inetd.sec i have little knowledge of hoe to edit those files/ i went to the etc library and didn't found src.sh file. what should i do? also didn't find the inetd.sec file In the host... (3 Replies)
Discussion started by: amirp
3 Replies

3. UNIX and Linux Applications

how do i enable messaging

hi guyz i work as a system administrator for some organization(am a newbie). one of the solaris machines is loaded with the messenger server...all configured by a former administrator. my task was to create user accounts for the mail and calendar services and as i checked its not working .....i... (0 Replies)
Discussion started by: henokia4j
0 Replies

4. Programming

problems while using messaging queues....

hi I am using posix functions such as mq_open, mq_close and including the mqueue.h. but its giving a linking error,"undefined reference to mq_open and mq_close". it it that we have to link some library or so while compiling... plzzz help Thanxs Mohit (0 Replies)
Discussion started by: mohit3884
0 Replies

5. UNIX for Advanced & Expert Users

The DT messaging system could not be started

Hello All, I am getting " The DT messaging system could not be started" message when wants to login as root on a box running on tru64 5.1A. /etc/hosts is ok. when i see in .dt/errorlog it shows message server could not be started. Thanks for help. Awadhesh (2 Replies)
Discussion started by: Awadhesh
2 Replies

6. Shell Programming and Scripting

The DT messaging system could not be started.

Good Morning, Users can no longer log into SunBlade 2500 Solaris 9 system (though root still can). Here's what I'm getting and what I've done. I'm most suspicious of the full drive since that pops up twice and I did see one looks full. What's a good way to reduce what's on it?- or.. what else... (2 Replies)
Discussion started by: Stellaman1977
2 Replies
dfstab(4)							   File Formats 							 dfstab(4)

NAME
dfstab - file containing commands for sharing resources across a network DESCRIPTION
dfstab resides in directory /etc/dfs and contains commands for sharing resources across a network. dfstab gives a system administrator a uniform method of controlling the automatic sharing of local resources. Each line of the dfstab file consists of a share(1M) command. The dfstab file can be read by the shell to share all resources. System administrators can also prepare their own shell scripts to execute particular lines from dfstab. The contents of dfstab put into effect when the command shown below is run. See svcadm(1M). /usr/sbin/svcadm enable network/nfs/server SEE ALSO
share(1M), shareall(1M), sharemgr(1M), svcadm(1M) NOTES
Do not modify this file directly. This file is reconstructed and only maintained for backwards compatibility. Configuration lines could be lost. Use the sharemgr(1M) command for all share management. SunOS 5.11 15 Aug 2008 dfstab(4)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy