fork + socket -server fails
- From: Wart <wart@xxxxxxxxxx>
- Date: Sun, 02 Apr 2006 00:11:10 -0800
While debugging a problem with tclhttpd on Fedora Core 5, I noticed the
following changed behavior.
If I use [fork] from either Expect or Tclx in combination with [socket
-server], the socket does not accept connections. This works fine on
Fedora Core 4.
Here is the sample script that I am using. On FC-4 I can telnet to port
8015 and the script prints out the expected "Accepted connection:"
message. On FC-5, nothing is printed. Turning off selinux and the
firewall do not fix the problem.
#!/usr/bin/tclsh
package require Expect
set port 8015
if {[fork]} {exit}
set serverSocket [socket -server myAccept $port]
puts "$serverSocket listening on port $port"
proc myAccept {args} {
puts "Accepted connection: $args"
}
vwait forever
FC-4 uses tcl-8.4.9 and expect-5.43.0. FC-5 uses tcl-8.4.12 and
expect-5.43.0. Has something changed between 8.4.9 and 8.4.12 that
might cause this, or is it more likely something changed in Fedora Core
that is causing the problem?
--Wart
.
- Follow-Ups:
- Re: fork + socket -server fails
- From: Gerald W. Lester
- Re: fork + socket -server fails
- From: Michael Schlenker
- Re: fork + socket -server fails
- Prev by Date: Re: invoking wish remotely
- Next by Date: Re: fork + socket -server fails
- Previous by thread: Re: invoking wish remotely
- Next by thread: Re: fork + socket -server fails
- Index(es):
Relevant Pages
|
|