Reduce copypasta in ext_hsl_os
commitfb69ddef434a3a46a32c411f24e53a7be5ab4242
authorFred Emmott <fe@fb.com>
Thu, 16 Apr 2020 16:41:13 +0000 (16 09:41 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 16 Apr 2020 16:44:22 +0000 (16 09:44 -0700)
tree754c92f649cea03d872da49196f3e1298b3c698b
parentc0ea7540bf77512709c9e409f62e1255e802b09f
Reduce copypasta in ext_hsl_os

Summary:
- remove `assertx(fd >= 0)` which were done inconsistently, and replace with
  consistent, clearer exception in factory function. Previously part of
  D20771508 (abandoned until GCC5 support is dropped)
- add macro for `hsl_cli_unwrap(INVOKE_ON_CLI_CLIENT(`

Reviewed By: alexeyt

Differential Revision: D21023291

fbshipit-source-id: 82d24faa5ff76dc1bb8a08cb7bc4bc2e922e267f
hphp/runtime/ext/hsl/ext_hsl_os.cpp