projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Completata sezione sulla risoluzione di nomi ed indirizzi, iniziato a
[gapil.git]
/
sources
/
TCP_echod_third.c
diff --git
a/sources/TCP_echod_third.c
b/sources/TCP_echod_third.c
index 86c154fd947226bc75ab0714ccdce0ae4ae36605..689049265861498279830c4fe0626f8ff22ac9c8 100644
(file)
--- a/
sources/TCP_echod_third.c
+++ b/
sources/TCP_echod_third.c
@@
-1,4
+1,4
@@
-/* TCP_echod
_third
.c
+/* TCP_echod.c
*
* Copyright (C) 2001-2004 Simone Piccardi
*
*
* Copyright (C) 2001-2004 Simone Piccardi
*
@@
-20,7
+20,6
@@
*
* Program echod
* Elementary TCP server for echo service (port 7)
*
* Program echod
* Elementary TCP server for echo service (port 7)
- * Third version, use sockbind
*
* Author: Simone Piccardi
* Jun. 2001
*
* Author: Simone Piccardi
* Jun. 2001
@@
-117,8
+116,7
@@
int main(int argc, char *argv[])
SignalRestart(SIGCHLD, HandSigCHLD); /* restarting handler */
}
/* create and bind socket */
SignalRestart(SIGCHLD, HandSigCHLD); /* restarting handler */
}
/* create and bind socket */
- if ( (list_fd = sockbind(argv[optind], "echo", 6, SOCK_STREAM)) < 0) {
- if (errno) perror("Socket creation error");
+ if ( (list_fd = sockbind(NULL, "echo", 6, SOCK_STREAM)) < 0) {
return 1;
}
/* release privileges and go daemon */
return 1;
}
/* release privileges and go daemon */