06-02-2008
As you are running the polling command as a background process, adding an "exit 0" statement in the script will solve the problem.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi Friends,
I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance.
Thanks&Regards,
Amit (1 Reply)
Discussion started by: amitsayshii
1 Replies
2. Shell Programming and Scripting
Hi Friends,
I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance.
Thanks&Regards,
Amit (1 Reply)
Discussion started by: amitsayshii
1 Replies
3. UNIX for Dummies Questions & Answers
Hi Friends,
I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance.
Thanks&Regards,
Amit (3 Replies)
Discussion started by: amitsayshii
3 Replies
4. Shell Programming and Scripting
hi scripting experts,
juz wondering if it's possible to have multiple rsh command in a single script? :confused:
ie:
rsh -l <username> "<command>"
rsh -l <username> "<command>"
thanks.
regards,
wee :) (0 Replies)
Discussion started by: lweegp
0 Replies
5. Shell Programming and Scripting
Hi All
I am trying to run an RSH command remotely to a machine, but I am gettinf the following errors, can anyone help me to resolve the errors
user@server10:~> rsh user@server24 'uname -n'
rcmd: getaddrinfo: Temporary failure in name resolution
Thanks in advance to all
Chirantan (3 Replies)
Discussion started by: csaha
3 Replies
6. Shell Programming and Scripting
i have a script called server.sh.
how to run this script in backgroung using nohup command (5 Replies)
Discussion started by: ali560045
5 Replies
7. Solaris
Hi
Can i ask?
I had multiple solaris workstation running and some local users using it. Is it possible to bind to the local user terminal or console he's using as if like the user well type and I can see it and what my typing in the local user see it also.
Is it possible..
Thanks. (3 Replies)
Discussion started by: jao_madn
3 Replies
8. Shell Programming and Scripting
Hello, I was trying to make some processes to run at background and went to a problem.
First I tried just to loop in one line something like this:
for i in {1..10}; do echo 'hello world' &; done;
but it pops a syntax error, so I tried several ways to fix it but wasn't able to understand... (2 Replies)
Discussion started by: Rash
2 Replies
9. Shell Programming and Scripting
I'm trying to run MPI programs on 8 machines, but I get the error
connect to address 127.0.0.1 port 544: Connection refused
Trying krb4 rsh...
connect to address 127.0.0.1 port 544: Connection refused
trying normal rsh (/usr/bin/rsh)
lagrid02: Connection refused
When I run it with a... (8 Replies)
Discussion started by: vishwamitra
8 Replies
10. Shell Programming and Scripting
I have an issue where I am running out of ports when using RSH to start a script remotely.
I have a script that i need to run that has been pushed out to every server. I have a list of servers (hostfilelist)
Basically, I have a simple loop that will run them in paralell.
for host in `cat... (1 Reply)
Discussion started by: nitrobass24
1 Replies
LEARN ABOUT CENTOS
tcl_detachpids
Tcl_DetachPids(3) Tcl Library Procedures Tcl_DetachPids(3)
__________________________________________________________________________________________________________________________________________________
NAME
Tcl_DetachPids, Tcl_ReapDetachedProcs, Tcl_WaitPid - manage child processes in background
SYNOPSIS
#include <tcl.h>
Tcl_DetachPids(numPids, pidPtr)
Tcl_ReapDetachedProcs()
Tcl_Pid
Tcl_WaitPid(pid, statusPtr, options)
ARGUMENTS
int numPids (in) Number of process ids contained in the array pointed to by pidPtr.
int *pidPtr (in) Address of array containing numPids process ids.
Tcl_Pid pid (in) The id of the process (pipe) to wait for.
int *statusPtr (out) The result of waiting on a process (pipe). Either 0 or ECHILD.
int options (in) The options controlling the wait. WNOHANG specifies not to wait when checking the process.
_________________________________________________________________
DESCRIPTION
Tcl_DetachPids and Tcl_ReapDetachedProcs provide a mechanism for managing subprocesses that are running in background. These procedures
are needed because the parent of a process must eventually invoke the waitpid kernel call (or one of a few other similar kernel calls) to
wait for the child to exit. Until the parent waits for the child, the child's state cannot be completely reclaimed by the system. If a
parent continually creates children and doesn't wait on them, the system's process table will eventually overflow, even if all the children
have exited.
Tcl_DetachPids may be called to ask Tcl to take responsibility for one or more processes whose process ids are contained in the pidPtr
array passed as argument. The caller presumably has started these processes running in background and does not want to have to deal with
them again.
Tcl_ReapDetachedProcs invokes the waitpid kernel call on each of the background processes so that its state can be cleaned up if it has
exited. If the process has not exited yet, Tcl_ReapDetachedProcs does not wait for it to exit; it will check again the next time it is
invoked. Tcl automatically calls Tcl_ReapDetachedProcs each time the exec command is executed, so in most cases it is not necessary for
any code outside of Tcl to invoke Tcl_ReapDetachedProcs. However, if you call Tcl_DetachPids in situations where the exec command may
never get executed, you may wish to call Tcl_ReapDetachedProcs from time to time so that background processes can be cleaned up.
Tcl_WaitPid is a thin wrapper around the facilities provided by the operating system to wait on the end of a spawned process and to check a
whether spawned process is still running. It is used by Tcl_ReapDetachedProcs and the channel system to portably access the operating sys-
tem.
KEYWORDS
background, child, detach, process, wait
Tcl Tcl_DetachPids(3)