08-10-2005
spawning the same program
We have a program (reader) that reads audio files in a real-time continuous stream from a sender program. If the reader gets weird we want the sender to be able to send one command that will stop the current reader and start a new one that will be able to continue reading in the files. The sender cannot access anything other than the reader (ie, it cannot run any commands on the server, etc). The reader runs on UNIX and is written in C++.
I've tried using system() to call a batch file that sleeps for a few second and then starts a new reader. It starts a new reader but the old one stays up. I've also tried exec(), which does replace the old reader with the new one but the new reader doesn't read the audio files; it just seems to sit out there doing nothing.
Is there a way to have a program basically kill itself and start a fresh version of itself that works?
Thank you.
10 More Discussions You Might Find Interesting
1. Solaris
Hi all,
First time poster here. Great forum.
Im trying to spawn new shells and pass commands to the new shells in a solaris 8 environment utilizing dtterm and its option -e.
I can successfully spawn a window utilizing the following code:
/usr/dt/bin/dtterm -display <ip.address> &
... (4 Replies)
Discussion started by: Rocketman8541
4 Replies
2. Shell Programming and Scripting
Hi all,
Im trying to figure out what the command would be to launch terminal windows from the command line in Open Step 4.2 . (looking for something similiar like /usr/bin/xterm or /usr/bin/dtterm etc)
echo $TERM = vt100
echo $SHELL = /bin/csh
Im combing over alot of OpenStep 4.2 and... (3 Replies)
Discussion started by: Rocketman8541
3 Replies
3. Shell Programming and Scripting
Hi there,
I have a shell script which I need to run it from two different places on the same server, are there any specific rules I need to apply? What is the best practice to achieve this task.
Regards (5 Replies)
Discussion started by: JimJim
5 Replies
4. Programming
I want to spawn n child processes but have two different classes..with the foremost one forking/spawning the child process and the latter performing a function w/ the spawned processes.
I can do this in one class with an if statement and the simple
if((pid=fork())==0) //child process
{
... (1 Reply)
Discussion started by: StrengthThaDon
1 Replies
5. Shell Programming and Scripting
Hi,
I need to spawn mutilpe threads , each invoking a different set of shell scripts, in parallel.
What would be the best way to do that.
Any sample script would greatly help. I am a novice at Unix so any help is much appreciated.
Thanks (5 Replies)
Discussion started by: neeto
5 Replies
6. UNIX for Advanced & Expert Users
Hi - I need help. My user crontab is spawning multiple at processes (and multiple mencoder program starts, that exit, then restart, repeatedly), locking up my system.
For example I have this entry in my crontab:
$ sudo crontab -u victoria -e
* * * * * ~/recordings/pvr1
* * * * *... (10 Replies)
Discussion started by: gstuart
10 Replies
7. UNIX for Advanced & Expert Users
Hi All,
I need some assistance, if possible...
Our IMAP server has recently (as of 10:30 GMT today) started spawning multiple processes for no reason! This is causing the mail server's load average to increase continually until the whole machine grinds to a halt.
Here is a typical... (0 Replies)
Discussion started by: fishsponge
0 Replies
8. Shell Programming and Scripting
When trying to get the correct syntax to cron a script that creates a file with the date stamp as its output, sometimes I get these results:
- from the command line, I may encounter an error that leaves me without the usual $ prompt. Am I in a new shell? I try to exit it with 'exit' or :q! and... (1 Reply)
Discussion started by: landog
1 Replies
9. AIX
Good night everyone, I've been trying to make AD authentication work with RBAC and I think I messed my test LPAR up.
I've manually modified the /etc/security/user.roles file, adding a role to one of my AD users (who is not defined locally) and then runned setkst. It worked fine, but now I found... (3 Replies)
Discussion started by: Janpol
3 Replies
10. Shell Programming and Scripting
Hi there,
I would like to understand the purpose of spawning a TTY shell?
Does it mean that it will help to open up a new Windows on the current interactive shell such that when the session gets lost the other won't
Any explanation will be helpful. (3 Replies)
Discussion started by: alvinoo
3 Replies
LEARN ABOUT SUSE
reader.conf
READER.CONF(5) PC/SC Lite READER.CONF(5)
NAME
reader.conf - configuration file for pcscd readers' drivers
DESCRIPTION
The /etc/reader.conf file contains configuration information for serial and (some) PCMCIA smart card readers.
USB readers SHALL NOT be configured using this file. pcscd uses another mechanism to automatically load USB drivers.
SYNTAX
The /etc/reader.conf is a regular text file. Each reader must be defined by four fields:
FRIENDLYNAME TEXT_STRING
DEVICENAME FILENAME
LIBPATH FILENAME
CHANNELID NUMBER
The "FRIENDLYNAME" field is an arbitrary text used to identify the reader. This text is displayed by commands like pcsc_scan(1) that prints
the names of all the connected and detected readers.
The "DEVICENAME" field was not used for old drivers (using the IFD handler version 2.0 or earlier). It is now (IFD handler version 3.0)
used to identify the physical port on which the reader is connected. This is the device name of this port. It is dependent of the OS ker-
nel. The first serial port device is called /dev/ttyS0 under Linux and /dev/cuaa0 under FreeBSD.
The "LIBPATH" field is the filename of the driver code. The driver is a dynamically loaded piece of code (generally a drivername.so*file).
The "CHANNELID" is no more used for recent drivers (IFD handler 3.0) and has been superseded by "DEVICENAME". If you have an old driver
this field is used to indicate the port to use. You should read your driver documentation to know what information is needed here. It
should be the serial port number for a serial reader.
EXAMPLE
# Gemplus GemPCTwin reader with serial communication
# connected to the first serial port
FRIENDLYNAME "GemPCTwin serial"
DEVICENAME /dev/ttyS0
LIBPATH /usr/lib64/readers/serial/libccidtwin.so.0.4.1
CHANNELID 1
DEBUGGING
In order to set up your /etc/reader.conf file correctly you may want to have debug messages from pcscd. I recommend you to start pscsd in
the foreground and debug mode using:
# pcscd --foreground --debug
If everything seems OK you can use the pcsc_scan command to print the list of correctly detected readers and try to get the ATR of your
smart cards.
AUTHOR
Ludovic Rousseau <ludovic.rousseau@free.fr>
SEE ALSO
pcscd(8), pcsc_scan(1)
Muscle August 2005 READER.CONF(5)