Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

interposer-safe.cpp 1.7KB

9 years ago
9 years ago
9 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Carla Interposer for audio-unsafe functions
  3. * Copyright (C) 2014-2015 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of
  8. * the License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #include "CarlaUtils.hpp"
  18. #include <cerrno>
  19. #include <dlfcn.h>
  20. #include <sched.h>
  21. #include <spawn.h>
  22. // -----------------------------------------------------------------------
  23. // Our custom functions
  24. CARLA_EXPORT
  25. pid_t fork()
  26. {
  27. carla_stdout("------------------------------- fork called");
  28. errno = ENOSYS;
  29. return -1;
  30. }
  31. CARLA_EXPORT
  32. int clone(int (*)(void*), void*, int, void*, ...)
  33. {
  34. carla_stdout("------------------------------- clone called");
  35. errno = ENOSYS;
  36. return -1;
  37. }
  38. CARLA_EXPORT
  39. int posix_spawn(pid_t*, const char*, const posix_spawn_file_actions_t*, const posix_spawnattr_t*, char* const[], char* const[])
  40. {
  41. carla_stdout("------------------------------- posix_spawn called");
  42. return ENOSYS;
  43. }
  44. CARLA_EXPORT
  45. int posix_spawnp(pid_t*, const char*, const posix_spawn_file_actions_t*, const posix_spawnattr_t*, char* const[], char* const[])
  46. {
  47. carla_stdout("------------------------------- posix_spawnp called");
  48. return ENOSYS;
  49. }
  50. // -----------------------------------------------------------------------