public static function sudo(callable $callable, array $arguments = array())
    {
        // don't do anything under Windows
        if (FileSystem::getOsIdentifier() === FileSystem::OS_IDENTIFIER_WIN) {
            return call_user_func_array($callable, $arguments);
        }

        // get the current user user pair (super user and effective user)
        $currentUserId = (integer) posix_geteuid();
        $superUserId = (integer) posix_getuid();

        // temporarily switch to the super user
        posix_seteuid($superUserId);

        // execute the callable
        $result = call_user_func_array($callable, $arguments);

        // switch back to the effective user
        posix_seteuid($currentUserId);

        return $result;
    }