I have trief a few things, after reading over exec again in the TCL doc I found the theoretically correct expression to call it. This is what I am currently using:
if {[catch {exec bash.exe -c "whois $query"} input] } {
I run ' bash.exe -c "whois t-online.de" ' from win xp command line and it executed the whois command corretly. The script seems not to have an other concerning error, since the captured error in $input will be forwarded via puthelp NOTICE $nick like:
[06:28:38] <@StarZ|De_Kus> ?whois t-online.de
[06:28:39] -StarZ|Clan- Fehler: couldn't duplicate input handle: bad file number
I have searched here and on egghelp.org, but couldn't find any solution. Is there simply none, or am I just too stupid to find one?
No, I'm not using the compilation here.
I just recompiled with newest cygwin and a snapshot from just a few days ago, same result. But then I found that there is finally a TCL version 8.4.9 avaible in the compilation section. Recompiled the bot and voila, its working ^-^. So the trick is the new TCL version, not the new eggdrop version ;).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem was the way earlier Tcl builds were compiled, using a mix of Windows code.
The current Tcl version was compiled as unix build, so performs much better overall.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Clue me in, please, but is it true that the way to get EXEC to work on windrop is to downgrade to ~1.6.12-15 or so? I seem to recall I fixed the exec problem by downgrading before, but I'd rather not do that since that screwed me over with that incessant opening/closing of ports bug...
I've tried v1.6.17, v1.6.18 from May and the latest v1.6.18 at the time (Nov 28) without any luck whatsoever.
.tcl exec "blabla" gets me this:
Tcl error: couldn't create error file for command: no such file or directory
Both in -nt, -n and default mode. On XP SP2.
TCL 8.4.11 doesn't help at all for me (that's the included version anyhow, right?).
Help, I'm getting desperate here :/ I seriously can't understand how it could be so difficult to fix... I mean, it used to work........ and many years have passed. What are the TCL dudes doing about it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, running just tcl 8.4.11 from the prompt and trying exec, it won't work. Same error message. So, will I have to find an older, working version of tcl? Or is cygwin the culprit? Trust me, I've read all the tcl-on-win32 discussions I could find through google and I couldn't find any decisive info whatsoever... a reference about /tmp/ or /var/tmp file permissions keeps coming up but it's not like that can be fixable on win32, now is it?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Nevermind. I actually solved it. I went backwards in versions of TCL until I came to 8.4.9, which seems to be the last one that actually works (I took the lib dir from the ActiveState compile). Sure, it didn't work at first, but I blindly managed to find out that if I took the ActiveState tcl84.dll and renamed it to libtcl8.4.dll and overwrote said file in the eggdrop root, it works.
Now the question is why there's no info about this anywhere? Or why an obviously non-working TCL version is packaged with windrop... Oh well. It's fixed. I'm happy. Now I have to write this down so I remember how to do it in the future.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have trief a few things, after reading over exec again in the TCL doc I found the theoretically correct expression to call it. This is what I am currently using:
if {[catch {exec bash.exe -c "whois $query"} input] } {
I run ' bash.exe -c "whois t-online.de" ' from win xp command line and it executed the whois command corretly. The script seems not to have an other concerning error, since the captured error in $input will be forwarded via puthelp NOTICE $nick like:
[06:28:38] <@StarZ|De_Kus> ?whois t-online.de
[06:28:39] -StarZ|Clan- Fehler: couldn't duplicate input handle: bad file number
I have searched here and on egghelp.org, but couldn't find any solution. Is there simply none, or am I just too stupid to find one?
Addional Debug:
.status //not complete output :)
running eggdrop v1.7.0+gotmsg-CHANMETA
OS: CYGWIN_NT-5.1 1.5.12(0.116/4/2)
Tcl Bibliothek: C:/Programme/eggdrop/lib/tcl8.4
Tcl version: 8.4.7 (header version 8.4.7)
.set errorInfo
Currently: couldn't duplicate input handle: bad file number
Currently: while executing
Currently: "exec cmd.exe /c whois $query"
set errorCode
Currently: POSIX EBADF {bad file number}
.tcl exec c:/Programme/putty.exe
Tcl error: couldn't duplicate input handle: bad file number
.set errorCode
Currently: POSIX EBADF {bad file number}
I have made a workaround:
http://forum.egghelp.org/viewtopic.php?t=9376
Try the current version of 1.6.18 CVS.
I actually use that version...
Use Eggdrop v1.6.18+sigsetjmp from http://windrop.sourceforge.net/downloads.html which was just updated yesterday.
No, I'm not using the compilation here.
I just recompiled with newest cygwin and a snapshot from just a few days ago, same result. But then I found that there is finally a TCL version 8.4.9 avaible in the compilation section. Recompiled the bot and voila, its working ^-^. So the trick is the new TCL version, not the new eggdrop version ;).
The problem was the way earlier Tcl builds were compiled, using a mix of Windows code.
The current Tcl version was compiled as unix build, so performs much better overall.
Clue me in, please, but is it true that the way to get EXEC to work on windrop is to downgrade to ~1.6.12-15 or so? I seem to recall I fixed the exec problem by downgrading before, but I'd rather not do that since that screwed me over with that incessant opening/closing of ports bug...
I've tried v1.6.17, v1.6.18 from May and the latest v1.6.18 at the time (Nov 28) without any luck whatsoever.
.tcl exec "blabla" gets me this:
Tcl error: couldn't create error file for command: no such file or directory
Both in -nt, -n and default mode. On XP SP2.
TCL 8.4.11 doesn't help at all for me (that's the included version anyhow, right?).
Help, I'm getting desperate here :/ I seriously can't understand how it could be so difficult to fix... I mean, it used to work........ and many years have passed. What are the TCL dudes doing about it?
Actually, running just tcl 8.4.11 from the prompt and trying exec, it won't work. Same error message. So, will I have to find an older, working version of tcl? Or is cygwin the culprit? Trust me, I've read all the tcl-on-win32 discussions I could find through google and I couldn't find any decisive info whatsoever... a reference about /tmp/ or /var/tmp file permissions keeps coming up but it's not like that can be fixable on win32, now is it?
Nevermind. I actually solved it. I went backwards in versions of TCL until I came to 8.4.9, which seems to be the last one that actually works (I took the lib dir from the ActiveState compile). Sure, it didn't work at first, but I blindly managed to find out that if I took the ActiveState tcl84.dll and renamed it to libtcl8.4.dll and overwrote said file in the eggdrop root, it works.
Now the question is why there's no info about this anywhere? Or why an obviously non-working TCL version is packaged with windrop... Oh well. It's fixed. I'm happy. Now I have to write this down so I remember how to do it in the future.