ps, etc are UNIX only

This commit is contained in:
Glenn Maynard
2004-06-16 23:49:00 +00:00
parent fbfe94e68e
commit de58c41367
+5 -2
View File
@@ -88,12 +88,14 @@ static int read_dev_urandom(char *buf, int len)
void noise_get_heavy(void (*func) (void *, int))
{
char buf[512];
FILE *fp;
int ret;
if (read_dev_urandom(buf, 32))
func(buf, 32);
#if defined(UNIX)
FILE *fp;
int ret;
fp = popen("ps -axu 2>/dev/null", "r");
while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0)
func(buf, ret);
@@ -103,6 +105,7 @@ void noise_get_heavy(void (*func) (void *, int))
while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0)
func(buf, ret);
pclose(fp);
#endif
}
/*