Running UBT without a shell

I’m trying to run UBT with the c exec family of functions, but every time I run it I receive the exception “couldn’t find find platform name”.

I can get UBT to run fine with system, or exec("/bin/sh", "sh", "-c", ubtCommand). I believe calling exec that way is basically the same as just calling system. (I fork the process before calling exec)

I tried setting -platform= to linux and unix with the same exception.

Is it possible to run UBT on Linux without first invoking a shell?

You need to run it through mono, see how the engine does that (RunMono.sh UnrealBuildTool args).