C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 01-26-2009, 09:07 AM   #1
Registered User
 
Join Date: Jan 2009
Posts: 1
BSD Socket Server Problem

Hi,

I have been working on a server using BSD sockets. However, sometimes I'll add a printf for debugging and the server won't accept any requests. Also, this is a server that's multi-threaded using fork(). Some printf statements work okay while others don't. Any Ideas?

Thanks.
ma_mazmaz is offline   Reply With Quote
Old 01-26-2009, 09:22 AM   #2
Registered User
 
Join Date: Jan 2009
Posts: 7
Some more information is required...may be a bit of server code that is causing problems??
me_ansh is offline   Reply With Quote
Old 01-26-2009, 12:40 PM   #3
Registered User
 
Join Date: Apr 2008
Posts: 278
Quote:
multi-threaded using fork()
this does not compute.
root4 is offline   Reply With Quote
Old 01-26-2009, 01:03 PM   #4
gcc -Wall -pedantic *.c
 
Join Date: Jan 2009
Location: London
Posts: 52
Is it multi-threaded or multi-processed?.. Cause fork() generates processes.
Use fprintf(stderr, ....) instead of printf(), or just flush the buffer after every time you call printf().
flexo87 is offline   Reply With Quote
Reply

Tags
bsd, listen, printf, server, socket

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
server client problem rudeboy Networking/Device Communication 5 05-17-2008 12:41 AM
socket message sending and receiving problem black C Programming 5 01-15-2007 04:46 AM
Client/Server Socket Receive Problem mariabair Networking/Device Communication 6 12-25-2003 10:01 AM
socket question Unregistered C Programming 3 07-19-2002 01:54 PM
Socket Problems (TNT) Windows Programming 4 08-18-2001 06:59 AM


All times are GMT -6. The time now is 06:02 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22