diff --git a/src/infrastructure/setup/PhabricatorSetup.php b/src/infrastructure/setup/PhabricatorSetup.php index 4eba25c3f6..7a841228e5 100644 --- a/src/infrastructure/setup/PhabricatorSetup.php +++ b/src/infrastructure/setup/PhabricatorSetup.php @@ -75,9 +75,12 @@ final class PhabricatorSetup { $open_arcanist = false; } - $open_urandom = @fopen('/dev/urandom', 'r'); - if (!$open_urandom) { - self::write("Unable to open /dev/urandom!\n"); + $open_urandom = false; + try { + Filesystem::readRandomBytes(1); + $open_urandom = true; + } catch (FilesystemException $ex) { + self::write($ex->getMessage()."\n"); } try {