[lldb] Don't use ::fork or ::vfork on watchOS or tvOS
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 26 Apr 2021 16:29:37 +0000 (09:29 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 26 Apr 2021 16:31:35 +0000 (09:31 -0700)
commit7d850db6b6438221555b800d31ef5dc63f50dc89
treef307f3be94317f11f8b622c013eef13e7066fd47
parentf9c0859e9687294a3b6b2e797faf4b7ee62c60ce
[lldb] Don't use ::fork or ::vfork on watchOS or tvOS

Update lldb-server to not use fork or vfork on watchOS and tvOS as these
functions are explicitly marked unavailable there.

llvm-project/lldb/test/API/tools/lldb-server/main.cpp:304:11:
error: 'fork' is unavailable: not available on watchOS
      if (fork() == 0)
          ^
WatchSimulator6.2.sdk/usr/include/unistd.h:447:8: note: 'fork' has been
explicitly marked unavailable here
pid_t    fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
         ^
llvm-project/lldb/test/API/tools/lldb-server/main.cpp:307:11:
error: 'vfork' is unavailable: not available on watchOS
      if (vfork() == 0)
          ^
WatchSimulator6.2.sdk/usr/include/unistd.h:602:8: note: 'vfork' has been
explicitly marked unavailable here
pid_t    vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
         ^
lldb/test/API/tools/lldb-server/main.cpp