Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-27-2005, 06:38 AM   #1
LQ Newbie
Registered: Oct 2005
Posts: 11

Rep: Reputation: 0
subprocedure control

Hi friends.

I have another question for u,. As I have explained in my last post (scripts that kill themselves), Im working on a script that manage telnet connections. The procedure is something like this...

code to be done inside the console
) telnet xx.xx.xx.xx >> destination.txt

By this way I can manage the consoles of the devices in the network, login inside them and extracting parameters in order to monitorize the network.

This code works perfectly if the console responses but if anything fails, the script hangs. If for example I try to enter to one console that is busy by other user, the console doesnt response but the script is not able to detect it and hangs.

I need to establish any kind of processes control in order to be able to close this sub-procedure if after a time, there is no response. Now, the main script continue running even if the sub-procedure is hanged, but it doesnt work right since its not able to connect to any console, probably because the old connection is still alive.

Im completely lost and if u can give me some hints or ideas, I will thank a lot.


Old 10-27-2005, 07:56 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,893

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
The Advanced Bash-scripting Guide, chapter 16, I/O redirection, may give you some ideas on how to redirect errors to a file and not hang the system.

In order to use a console with another users parameters, try using 'xhost +localhost', or some variation of that command, before trying to access that user's console.

See the man pages or info files for xhost for more information on how to use the command.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Control amount of time a user may be logged in. (Parental Control) darrensnospam Mandriva 13 02-18-2006 05:01 PM
remote control kjs Linux - Software 5 02-24-2005 03:09 PM
X out of control! erickFis Linux - Hardware 13 01-23-2004 11:41 AM
Can't launch redhat-network-control after updating gnome-control-center fedetxf Red Hat 0 12-12-2003 07:12 AM
control dummyagain Programming 1 10-04-2003 07:09 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:22 PM.

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