Varie correzioni, completata revisione capitolo sull'I/O su file
[gapil.git] / listati / TCP_echod_third.c
1 int main(int argc, char *argv[])
2 {
3 /* 
4  * Variables definition  
5  */
6     int list_fd, conn_fd;
7     ...
8     /* Main code begin here */
9     if (compat) {                             /* install signal handler */
10         Signal(SIGCHLD, HandSigCHLD);         /* non restarting handler */
11     } else {
12         SignalRestart(SIGCHLD, HandSigCHLD);  /* restarting handler */
13     }
14     /* create and bind socket */
15     if ( (list_fd = sockbind(argv[optind], "echo", 6, SOCK_STREAM)) < 0) {
16         return 1;
17     }   
18     ...
19 }