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

vwait forever in tclsh don't work

168 views
Skip to first unread message

Chia-Wei Chow

unread,
Jun 17, 2000, 3:00:00 AM6/17/00
to
hi all,

is there a way to do
vwait forever

in tclsh?

i get the following error:
can't wait for variable "forever": would wait forever

but i really need to wait forever. and i can't use wish
because i'm rsh the script and DISPLAY env doesn't get set therefore
wish won't work. I'm on UNIX.

thanks in advance,
c.w.

Jeff Godfrey

unread,
Jun 17, 2000, 3:00:00 AM6/17/00
to
"vwait forever" should work fine. Works OK for me.

What version of tcl are you running?

Jeff


"Chia-Wei Chow" <ch...@sim.ssd.bna.boeing.com> wrote in message
news:394AD5B6...@sim.ssd.bna.boeing.com...

Darren New

unread,
Jun 18, 2000, 3:00:00 AM6/18/00
to
Chia-Wei Chow wrote:
> i get the following error:
> can't wait for variable "forever": would wait forever

You don't really want to wait *forever*. You want to wait until the next
event happens, do that event, then wait some more. This is telling you that
you have no source of events. I.e., you have no outstanding [after] or
[fileevent] things set up.

--
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST). Cryptokeys on demand.
"You know Lewis and Clark?" "You mean Superman?"

Chia-Wei Chow

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
Darren New wrote:
>
> Chia-Wei Chow wrote:
> > i get the following error:
> > can't wait for variable "forever": would wait forever
>
> You don't really want to wait *forever*. You want to wait until the next
> event happens, do that event, then wait some more. This is telling you that
> you have no source of events. I.e., you have no outstanding [after] or
> [fileevent] things set up.
>

i actually do. because the way existing software is, there's really no
next
event except to keep this process alive. i suppose i could use an
infinite
loop to do that too.

thanks,
c.w.

Chia-Wei Chow

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to Jeff Godfrey
hi,

thanks for responding/helping.
i am using TclPro's 1.2 (protclsh80) which is

% puts $tcl_patchLevel
8.0.5

you said yours worked. what version are you using?


thanks,
c.w.

Darren New

unread,
Jun 19, 2000, 3:00:00 AM6/19/00
to
Chia-Wei Chow wrote:
> > You don't really want to wait *forever*.

> i actually do. because the way existing software is, there's really no


> next
> event except to keep this process alive.

That's what the error message means.

> i suppose i could use an
> infinite
> loop to do that too.

Why do you want to keep the process alive if it's never going to wake up
again? I suspect there's a fundamental design flaw. If the process is never
going to do anything else in its lifetime, why is it running?

Chia-Wei Chow

unread,
Jun 20, 2000, 3:00:00 AM6/20/00
to
Darren New wrote:
>
> Chia-Wei Chow wrote:
> > > You don't really want to wait *forever*.
>
> > i actually do. because the way existing software is, there's really no
> > next
> > event except to keep this process alive.
>
> That's what the error message means.
>
> > i suppose i could use an
> > infinite
> > loop to do that too.
>
> Why do you want to keep the process alive if it's never going to wake up
> again? I suspect there's a fundamental design flaw. If the process is never
> going to do anything else in its lifetime, why is it running?
>
it's running because existing software needs to have at least one client
connection
for it to stay up. yes, i agree there's a fundamental design flaw, but
we don't have
time to rewrite it.

Jeff Godfrey verified that
vwait forever
works on NT95 8.2.2
is this a bug for unix?

c.w.

Paul Duffin

unread,
Jun 20, 2000, 3:00:00 AM6/20/00
to
Chia-Wei Chow wrote:
>
> Darren New wrote:
> >
> > Chia-Wei Chow wrote:
> > > > You don't really want to wait *forever*.
> >
> > > i actually do. because the way existing software is, there's really no
> > > next
> > > event except to keep this process alive.
> >
> > That's what the error message means.
> >
> > > i suppose i could use an
> > > infinite
> > > loop to do that too.
> >
> > Why do you want to keep the process alive if it's never going to wake up
> > again? I suspect there's a fundamental design flaw. If the process is never
> > going to do anything else in its lifetime, why is it running?
> >
> it's running because existing software needs to have at least one client
> connection
> for it to stay up. yes, i agree there's a fundamental design flaw, but
> we don't have
> time to rewrite it.
>

What sort of 'connection' do you have ? If it is a socket then just register
a fileevent, if it is something else then register a timer to trigger in
a few months time.

proc poll-every-month {} {
after 30*24*60*60*100 poll-every-month
}

> Jeff Godfrey verified that
> vwait forever
> works on NT95 8.2.2
> is this a bug for unix?
>

No, it's a bug in the NT implementation.

0 new messages