Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-10-20
09:20 • Closed ticket [982547ffff]: exec doesn't return sometimes plus 6 other c... artifact: 908aa28862 user: sf-robot
2005-10-06
06:17 • Pending ticket [982547ffff]. artifact: 146e48234f user: andreas_kupries
2004-07-21
19:02 • Open ticket [982547ffff]. artifact: d7e2bfa021 user: p_samson
2004-07-20
01:38 • Pending ticket [982547ffff]. artifact: e7790f221a user: hobbs
2004-07-19
22:35 • Ticket [982547ffff]: 4 changes artifact: b3fa97d0fe user: nobody
16:34 • Ticket [982547ffff]: 4 changes artifact: 45ead4464c user: nobody
2004-06-30
16:32 • Ticket [982547ffff]: 2 changes artifact: bcd0c0c3e2 user: dkf
07:38 • New ticket [982547ffff]. artifact: 80bced38ce user: p_samson

exec doesn't return sometimes

Closed / Out of Date982547ffffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 21 years ago
Descriptionplain2004-06-30 07:38:44
OS: Windows/Cygwin

I have a script  running regularly (every 5 mn),
with this command:

if {[catch {eval exec "bash --login file.tcl $dbname
$table $dirlog"} errmsg]} {
 puts ...
} else {
 puts ...
}

It can run perfectly for days, but sometimes,
as this morning (05:20 AM, so no activity),
the command freezes and doesn't return.
No puts is executed.
The bash process has done its work,
I can see that its last instruction (a puts) is
executed, and there is no more sh or pgtclsh
process anymore.

It seems as if exec didn't detect the end of
execution of this argument and still waits.

It may be a race condition, so I can not
reproduce it at will, nor provide a test case,
sorry.
Anyway, I submit the bug report for the record,
and in the hope it may ring a bell for the exec
command maintainer.
Some "me too" are welcome as well.
dkf Ticket [982547ffff]: 2 changes [History diff]2004-06-30 16:32:44
nobodyplain2004-07-19 16:34:01
Logged In: NO 

We reproduce this problem very often.
nobodyplain2004-07-19 22:35:16
Logged In: NO 

I could reproduce this problem very easily with TclTk 8.3.2
by calling for instance exec pv.exe in an loop
If I started 3 to 4 jobs of this kind in parallel it used to hang 
TclTk interpretors within minutes!

According to my tests done today, it seems to be ok with 
TclTk 8.4.6.1.  I cross the fingers and hope it can continue 
like this for a few days...

So you should check your installed TclTk version
hobbsplain2004-07-20 01:38:09
Logged In: YES 
user_id=72656

appears to be fixed in recent releases then.
p_samsonplain2004-07-21 19:02:30
Logged In: YES 
user_id=994002

Unfortunately I'm running a Cygwin version of TCL.
So I'm stuck to the current 8.4.1 package until the maintainer
builds a more recent one.
Thanks for your comments. Make me feel I'm not mad or
alone in this world :)

(nobody), who couldn't reproduce the pb with 8.4.6.1 anymore,
please confirm after a long time run of your case test (with
these aleatory pb, you're never sure).

Meanwhile, I'm redesigning the sources to avoid exec as
much as possible.
andreas_kupries Pending ticket [982547ffff]. [History diff]2005-10-06 06:17:57
sf-robotplain2005-10-20 09:20:41
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Log in (anonymous is fine) to add a comment.