Ahmed Shabana wrote:
> THIS CODE through a segmentation fault at PC= 0x80485e9 "from GDB"
> and I donot know why ?? can any one help ?
> 
> 
> 
> #include<stdio.h>
> #include<unistd.h>
> #include<sys/socket.h>
> #include<stdlib.h>
> #include<netdb.h>
> #include<string.h>
> 
> #define execption_handler(msg)        \
>       do { perror(msg) ;} while(0)
> 
> void client_side_work(int sfd)
> {
>       char* message;
>       sprintf(message,"GET /index.html\n");

You've got a pointer that isn't initialized that you are attempting to 
use.  The compiler should be complaining about it.  If not, turn up the 
warning level until it does.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to