Fix `os.register_at_fork` not defined on Windows (#30809)
Summary:
According to https://docs.python.org/3.8/library/os.html#os.register_at_fork, this function is only available in Unix platforms.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30809
Differential Revision: D18828777
Pulled By: bddppq
fbshipit-source-id: 3325a984da488bb0a80a5c27131553fbcf78921f