Moved RMAPI_FUNC_SUPPORTED location such that it will be visible to modules (#8037)

The RMAPI_FUNC_SUPPORTED was defined in the wrong place on redismodule.h
and was not visible to modules.

(cherry picked from commit 97d647a139)
This commit is contained in:
Meir Shpilraien (Spielrein)
2021-01-12 16:25:37 +02:00
committed by Oran Agra
parent 2c5865cd90
commit fb86ecb802
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -28,6 +28,12 @@ int fork_create(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
RedisModule_WrongArity(ctx);
return REDISMODULE_OK;
}
if(!RMAPI_FUNC_SUPPORTED(RedisModule_Fork)){
RedisModule_ReplyWithError(ctx, "Fork api is not supported in the current redis version");
return REDISMODULE_OK;
}
RedisModule_StringToLongLong(argv[1], &code_to_exit_with);
exitted_with_code = -1;
child_pid = RedisModule_Fork(done_handler, (void*)0xdeadbeef);