Skip to content

Multithreaded TCPServer crashes immediately #64

Open
@Gundolf68

Description

@Gundolf68

Was: mruby/mruby#4949

This:

server = TCPServer.open(8000)    
loop do                          
	Thread.start(server.accept) do |client|
		client.write "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nConnection: close\r\nContent-Length: 11\r\n\r\nHello world"
		client.close                  
	end
end

on Ubuntu 18.04.
At the first request, the program exits with a Segmentation fault.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions