Bug 11939 - spawn after fork doesn't work in expect with --enable-threads
spawn after fork doesn't work in expect with --enable-threads
Product: Red Hat Raw Hide
Classification: Retired
Component: tcltk (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Depends On:
  Show dependency treegraph
Reported: 2000-06-07 04:28 EDT by Jonathan Kamens
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-06-07 04:28:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2000-06-07 04:28:36 EDT
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 09:45:04 EDT
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.