[Prev][Next][Index][Thread]
BSD sockets, and pthreads.
I'm working on writing a simple HTTP/FTP server combo using the 990722
snapshot. We've got simple single connection unthreaded FTP and HTTP
servers working. However, when we tried putting them into one server
using two threads, one for FTP, and one for HTTP, we ran into trouble.
We tried just having one thread (for HTTP, the simpler protocol) and have
the main program just read from consol looking for a quit command.
The server is started, and completes the bind() and listen() calls but
accept never returns.
The console watching works just fine. And if we do only the FTP server it
successfully accepts a connection, but then dies at some, currently,
unknown point after receiving the first command.
We're using the thread safe freebsd libraries, and calling the pthread
versions of all the init code
oskit_clientos_init_pthreads();
start_clock();
start_pthreads();
osenv_process_lock();
start_devices();
osenv_process_unlock();
start_fs_pthreads("wd0", "e");
start_network_pthreads();
We're kinda at a loss right now as to what is failing...
any suggestions would be greatly appreciated.
Thanks,
Britt, and his partner in code^H^H^Hrime Jay.
------------------------------------------------------------------------
Britt Bolen EECS Computer Support Office & Vino Lab
Division of Engineering and Applied Sciences email: bolen@eecs
Harvard University voice: 617 495-UNIX
MD 209, 33 Oxford St., Cambridge, MA, 02138 fax: 617-496-1066
------------------------------------------------------------------------