|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T n
Length: 529 (0x211) Types: TextFile Names: »nproc.c«
└─⟦db229ac7e⟧ Bits:30007240 EUUGD20: SSBA 1.2 / AFW Benchmarks └─⟦this⟧ »EUUGD20/AFUU-ssba1.21/ssba1.21F/config/nproc.c«
/* * SSBA 1.21F * nproc.c * * Ecrit par Philippe Dax (ENST) */ #include <stdio.h> #include "../install/signal.h" #define NPROC_BEFORE 10 /* /bin/sh + nproc + shells ssba */ #define NPROC_LIMIT 10000 main() { int nproc = NPROC_BEFORE; int xid = 0; static int pid[NPROC_LIMIT]; for (;; xid++) { switch (pid[xid] = fork()) { case 0 : pause(); exit(1); case -1: printf("%d\n", nproc); while (xid--) kill(pid[xid], SIGKILL); while (wait(0) != -1) ; exit(0); default: nproc++; continue; } } }