Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


It 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 for more details


> 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.


Nope, forks actually do copy the program counter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: