hmm, probably the opened console doesnt close when psybnc switchs to background. haev you tried to use open | instead and just close the open console forcefully? Can't garantue it won't leave shadow consoles running somewhere in the memory ^-^.
i cant really tell you why, but you could try to split the killall and ./psybnc into 2 open queries and use the cd tcl command to change the dir (better change it back afterwards with the backup made by pwd ^^), would be probably slower, but it would at least track down the error source, if still doesnt want to work .
I noticed that the command I'm issuing isn't correct, I tried 'pwd' it gave the directory the bot's in nomatter what user I specify. So, until I figure out which shell command to use, we'll see if it works
Sir_Fz wrote:I noticed that the command I'm issuing isn't correct, I tried 'pwd' it gave the directory the bot's in nomatter what user I specify. So, until I figure out which shell command to use, we'll see if it works
thats only natural, because the cd command in your exec/open line only changes the path for the current instance of bash (or better sudo in this case). thats why I suggested to really change the bots current directory .
as said, to avoid freezing you have to use the non-blocking open. exec will always be in blocking mode.
you can addionally use catch {open ...} to ignore any returned errors.
catch {set this [set yo [open "|sudo su Fz -c "cd $mydir/psybnc;./psybnc"]][close $yo]} error
i hope it is
[open "|sudo su Fz -c "cd $mydir/psybnc;./psybnc""]
the code above would be missing 1 close quote ^^
but besides this... very strange. If you believe the sudden close could cause the chield termination, you could try to "softly" close it via:
fconfigure $yo -blocking 0
fileevent $yo readable "close $yo"
but probably the error occurs while "open" is execute, so I think it would be unlogical to help ^^
The comany's owner is going to make a bash command on the shell, so all I have to exec is the command user and pass. That should fix the problem. Thanx
NAME
nohup - run a command immune to hangups, with output to a non-tty
SYNOPSIS
nohup COMMAND [ARG]...
nohup OPTION
DESCRIPTION
Run COMMAND, ignoring hangup signals.
--help display this help and exit
--version
output version information and exit
what was the signal hangup (kill -s SIGHUP <pid>" to do with a prozess causing a blocking behavior? I somehow doubt the prozess causes the stuck because it recieves the signal hangup .
Imo eggdrop stuck because it wait until the exec will return somethink.. Or until the executed proces will go to background or will end..
Maybe i'm wrong.. You could also try ./psybnc &(but..if you log out, your background task might get killed automatically).. Just some sugestions ;)