egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

start programs in background

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Koepi
Voice


Joined: 31 Aug 2003
Posts: 26

PostPosted: Thu Jun 08, 2006 3:08 pm    Post subject: start programs in background Reply with quote

Hi,

with exec the bot can execute programs. in this time the bot don't react and get sometimes a timeout.
is it possible to execute a program in the background, so that the eggdrop further react?

sorry for my bad english Wink

greets
Back to top
View user's profile Send private message
Garp
Voice


Joined: 15 Sep 2003
Posts: 29

PostPosted: Thu Jun 08, 2006 5:47 pm    Post subject: Reply with quote

I have the same question. I use

Code:
set reply [exec whois.sh $ip]


where whois.sh is a shell script that does a whois lookup and grep for country and ip range. Sometimes the bot doesn't get an answer and waits and waits. Is there a way to execute a shell script and kill the script after a time?
Back to top
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Thu Jun 08, 2006 9:33 pm    Post subject: Reply with quote

the bot doesnt support executing to background. you would need to use a "loader" in order to achive real background running, but you probably only need to run a non-blocking child. Use instead:
Code:
set reply [open "|whois.sh $ip" r]

You will most likely want to read up more information about asynrounous file usage including callbacks via fileevent.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Garp
Voice


Joined: 15 Sep 2003
Posts: 29

PostPosted: Fri Jun 09, 2006 2:54 pm    Post subject: Reply with quote

Vielen Dank Thank you very good inspiration
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber