projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Si prosegue con le modifiche per l'inclusione degli esempi di codice.
[gapil.git]
/
listati
/
get_child_max.c
diff --git a/listati/get_child_max.c
b/listati/get_child_max.c
new file mode 100644
(file)
index 0000000..
9890abf
--- /dev/null
+++ b/
listati/get_child_max.c
@@ -0,0
+1,12
@@
+get_child_max(void)
+{
+#ifdef CHILD_MAX
+ return CHILD_MAX;
+#else
+ int val = sysconf(_SC_CHILD_MAX);
+ if (val < 0) {
+ perror("fatal error");
+ exit(-1);
+ }
+ return val;
+}