MCPcopy Create free account
hub / github.com/HumbleNet/HumbleNet / launchExecutable

Function launchExecutable

3rdparty/Amalgamate/juce_core_amalgam.cpp:27638–27657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27636 #endif
27637
27638 static bool launchExecutable (const String& pathAndArguments)
27639 {
27640 const char* const argv[4] = { "/bin/sh", "-c", pathAndArguments.toUTF8(), 0 };
27641
27642 const int cpid = fork();
27643
27644 if (cpid == 0)
27645 {
27646 // Child process
27647 if (execve (argv[0], (char**) argv, 0) < 0)
27648 exit (0);
27649 }
27650 else
27651 {
27652 if (cpid < 0)
27653 return false;
27654 }
27655
27656 return true;
27657 }
27658}
27659
27660bool File::isOnCDRomDrive() const

Callers 1

openDocumentMethod · 0.85

Calls 2

exitFunction · 0.85
toUTF8Method · 0.80

Tested by

no test coverage detected