2009/7/31 erik quanstrom <[email protected]>:
>> > could you be more specific. what is your test program,
>> > where is it crashing (if you know), and what is the panic
>> > message, if any? i must be dense, but i'm confused by
>> > your process diagram.
>>
>> He posted it earlier in this thread
>>
>> --dho
>
> please post a reference. i do not see either the crash
> code or the panic message on 9fans.net/archive/2009/07.
> i don't recall it in the originals, either.
>
> - erik
Was received as an attachment. Inline:
#include <u.h>
#include <libc.h>
void
main(int argc, char **argv)
{
char *buf;
int fd;
if((fd = open("/dev/zero", OREAD)) < 0)
sysfatal("open");
buf = (char*)0x600000;
segattach(0, "memory", buf, 2*4096);
switch(rfork(RFPROC|RFMEM)){
case -1:
sysfatal("fork");
break;
case 0:
for(;;){
read(fd, buf+4096, 4096);
}
}
sleep(1000);
segbrk(buf, buf+4096);
}
--dho