Share

Tcl

Tracker: Bugs

5 exec doesn't return sometimes - ID: 982547
Last Update: Comment added ( sf-robot )

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.


Patrick Samson ( p_samson ) - 2004-06-30 07:38

5

Closed

Out of Date

Andreas Kupries

24. Channel Commands

obsolete: 8.4.1

Public


Comments ( 5 )

Date: 2005-10-20 02:20
Sender: sf-robotSourceForge.net Site Admin

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).


Date: 2004-07-21 12:02
Sender: p_samson

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.



Date: 2004-07-19 18:38
Sender: hobbsSourceForge.net SubscriberProject Admin

Logged In: YES
user_id=72656

appears to be fixed in recent releases then.


Date: 2004-07-19 15:35
Sender: nobody

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


Date: 2004-07-19 09:34
Sender: nobody

Logged In: NO

We reproduce this problem very often.




Attached File

No Files Currently Attached

Changes ( 10 )

Field Old Value Date By
status_id Pending 2005-10-20 02:20 sf-robot
close_date 2005-10-05 23:17 2005-10-20 02:20 sf-robot
status_id Open 2005-10-05 23:17 andreas_kupries
close_date 2004-07-19 18:38 2005-10-05 23:17 andreas_kupries
status_id Pending 2004-07-21 12:02 p_samson
close_date - 2004-07-19 18:38 hobbs
status_id Open 2004-07-19 18:38 hobbs
resolution_id None 2004-07-19 18:38 hobbs
category_id 16. Commands A-H 2004-06-30 09:32 dkf
assigned_to dkf 2004-06-30 09:32 dkf