c - select for reading after a fork -
how select reading being handled on linux systems in case process forked after opening udp socket? - possible in kind of program:
so = open socket fork for(;;) { select() reading on socket recv }
two packets wake 1 of processes (in case arrive before waiting process notified / exits select) , second 1 of packets not received?
or can assume udp, every packet wake process or leave flag set?
each processes, parent , child, has fie descriptor same socket. per file descriptor attributes independent (e.g. blocking, being able close socket).
in scenario indeed feasible legal 1 of processes, example waken , read data socket before other 1 getting select.
Comments
Post a Comment