Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

correctly exit a tk program?

45 views
Skip to first unread message

Ulli Horlacher

unread,
Jan 30, 2011, 4:39:23 AM1/30/11
to

How do I correctly terminate a tk program?

I have :

sub quit {
$TOP->destroy;
kill 15,$$;
exit;
}

But this produces:

destroy (1):
0 0x862c864 PVMG f=0008e007 {}(3)(3)
SV = PVMG(0x87b3900) at 0x862c864
REFCNT = 3
FLAGS = (GMG,SMG,RMG,ROK)
IV = 0
NV = 0
RV = 0x875bb88
PV = 0x875bb88 ""
CUR = 0
LEN = 0
MAGIC = 0x87b7488
MG_VIRTUAL = 0xb751d704
MG_TYPE = PERL_MAGIC_ext(~)
MG_FLAGS = 0x02
REFCOUNTED
MG_OBJ = 0x875bb58
SV = PV(0x8713318) at 0x875bb58
REFCNT = 1
FLAGS = ()
PV = 0x87b73f8 ""
CUR = 0
LEN = 16
destroy (1):
0 0x862c864 PVMG f=0008e007 {}(3)(3)
SV = PVMG(0x87b3900) at 0x862c864
(... many more lines ...)


A simple:

sub quit {
exit;
}

does the same. No difference.


--
Ullrich Horlacher Informationssysteme und Serverbetrieb
Rechenzentrum E-Mail: horl...@rus.uni-stuttgart.de
Universitaet Stuttgart Tel: ++49-711-685-65868
Allmandring 30 Fax: ++49-711-682357
70550 Stuttgart (Germany) WWW: http://www.rus.uni-stuttgart.de/

Steve C

unread,
Feb 3, 2011, 2:41:40 PM2/3/11
to

I've always just used exit. Please post a minimum program
that shows this error.

Ulli Horlacher

unread,
Feb 3, 2011, 3:28:23 PM2/3/11
to
Steve C <smal...@juno.com> wrote:
> On 01/30/2011 04:39 AM, Ulli Horlacher wrote:
> > How do I correctly terminate a tk program?
> >
> > I have :
> >
> > sub quit {
> > $TOP->destroy;
> > kill 15,$$;
> > exit;
> > }
> >
> > But this produces:
> >
> > destroy (1):
> > 0 0x862c864 PVMG f=0008e007 {}(3)(3)
> > SV = PVMG(0x87b3900) at 0x862c864
>
> I've always just used exit. Please post a minimum program
> that shows this error.

BRMMMLLL... I cannot reproduce it any more...

It seems: posting to comp.lang.perl.tk automatically solves my problems :-)

0 new messages