Jasper Yu says to YSITD
write(1, &rnd, sizeof(rnd)); read(0, &val, sizeof(val));