Bug 11939 - spawn after fork doesn't work in expect with --enable-threads
Summary: spawn after fork doesn't work in expect with --enable-threads
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: tcltk
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-06-07 08:28 UTC by Jonathan Kamens
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-06-07 08:28:38 UTC
Embargoed:


Attachments (Terms of Use)

Description Jonathan Kamens 2000-06-07 08:28:36 UTC
I am using the RawHide tcltk-8.2.3-36 package with the following changes:

* Expect version upgraded to 5.31.8.
* Tcl and Tk versions upgraded to 8.3.1.
* Removed patches that are no longer necessary after Tcl and Tk upgrades.
* Change Expect "cd" build commands because the Expect source code now
unpacks into a directory with a hyphen in it.

With these changes, the following Expect script does not work properly:

#!/usr/bin/expect --

--- cut here ---
set timeout 2
set pid [fork]

if {! $pid} {
    spawn echo ready
    expect {
	{ready} {
	    send_error "got ready\n"
	}
	default {
	    send_error "didn't get ready\n"
	}
    }
}
--- cut here ---

It should print "got ready", but instead it prints "didn't get ready".

I solved this problem by removing "--enable-threads" from the spec file.

I think that the "experimental" --enable-threads should be removed until
it's a bit less experimental.

Comment 1 Jeff Johnson 2000-06-10 13:45:04 UTC
The option --enable-threads has been removed in tcltk-8.3.1.


Note You need to log in before you can comment on or make changes to this bug.