| View previous topic :: View next topic |
| Author |
Message |
Koepi Voice
Joined: 31 Aug 2003 Posts: 26
|
Posted: Thu Jun 08, 2006 3:08 pm Post subject: start programs in background |
|
|
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
greets |
|
| Back to top |
|
 |
Garp Voice
Joined: 15 Sep 2003 Posts: 29
|
Posted: Thu Jun 08, 2006 5:47 pm Post subject: |
|
|
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 |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Thu Jun 08, 2006 9:33 pm Post subject: |
|
|
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 |
|
 |
Garp Voice
Joined: 15 Sep 2003 Posts: 29
|
Posted: Fri Jun 09, 2006 2:54 pm Post subject: |
|
|
| Vielen Dank Thank you very good inspiration |
|
| Back to top |
|
 |
|