3 ms·
Can't the LibreSSL process just reseed whenever it is started? I guess forks don't actually copy the program counter so they'll have to go through main, right?
by tormeh 12y ago
Can't the LibreSSL process just reseed whenever it is started? I guess forks don't actually copy the program counter so they'll have to go through main, right?
- agwa 12y agoNope, forks actually do copy the program counter.
- cjg_ 12y agoIt does copy the PC. Actually it just return from the fork call twice, one in the parent and one in the child, with different return values, the pid of the child to the parent and zero to the child. See http://linux.die.net/man/2/fork http://linux.die.net/man/2/fork for more details
- Raphael_Amiard 12y ago> I guess forks don't actually copy the program counter so they'll have to go through main, right? This is the way the fork syscall works on all Unices, the fork will start execution right after the fork system call.