comp.unix.programmer
  Home FAQ Contact Sign in
comp.unix.programmer only
 
Advanced search
July 2008
motuwethfrsasuw
 123456 27
78910111213 28
14151617181920 29
21222324252627 30
28293031    31
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.unix.programmer Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  server address and port         


Author: Mr_John
Date: Jul 6, 2008 15:56

testing my web server under BSD i have used
my_addr.sin_family = AF_INET; /* IPv4 address */
my_addr.sin_addr.s_addr = htonl(INADDR_ANY); /* all addresses */
my_addr.sin_port = htons(SRV_PORT); /* SRV_PORT, network order */
to set the address of webserver and its port.
now i would initialize the address and the port number in the prompt
command of my webserver
like
./webserver 127.0.0.1 8080.
i receive these parameter from the main but when i try to use them
into my_addr and i try to bind the bind function returns an error.how
i can do that?
thanks
4 Comments
  Wait_event_timeout kernel macro doubt         


Author: Marco
Date: Jul 6, 2008 11:46

I've got a doubt about wait_event_timeout:

DEFINE_WAIT()
for(;;){
prepare_to_wait();
if(condition)
break;
ret=schedule_timeout();
if(!ret)
break;
}
finish_wait();

if after prepare_to_wait but before the if statement the scheduler
gets up and running (for example after an interrupt), is the caller
process, at this point with state TASK_INTERRUPTIBLE or
TASK_UNINTERRUPTIBLE, blocked untill someone calls wake_up? If so,
wait_event_timeout is equal than wait_event. In addition, if the
wake_up is called before prepare_to_wait and happends this case and
the process was TASK_UNINTERRUPTIBLE, the process will spleep for
ever. Am I saying a stupid thing?
Show full article (0.68Kb)
4 Comments
  FREE SOFTWARE DOWNLOAD         


Author: PREMA
Date: Jul 6, 2008 04:50

FREE SOFTWARE DOWNLOAD
http://freesoftware20.blogspot.com
no comments