I have tried to restrict fork system call and allow thread system by using Setrlimit, nproc, but fork and thread both are not allowed by using Setrlimit. So I have come to know using seccomp but still same issue. Even seccomp also works same as Setrlimit.
I have tried Setrlimit as it is not working, starting looking on seccomp.