Overview
| Artifact ID: | f0633caf65b2e499d3b9d78f3b137366ccd10bb91034f04bcbced8a482aee1a1 |
|---|---|
| Ticket: | c54e4a1aeb999fe8d878eae790243739ef05517a
High Tcl latencies with fork() in larger systems |
| User & Date: | gustafn3 on 2023-06-30 10:03:52 |
Changes
- icomment:
The updated branch contains now: a) Added auto-configuration of posix_spawnp() b) Removed the automatic setting of USE_VFORK for macOS c) an updated configure script to ease testing of this branch (separate commit, to further ease cherry-picking, not sure, what the tcl-core policy for configure scripts is) Point (b) is probably the most complex one, and not directly related with the ticket. The automatic setting of USE_VFORK in unix/configure.in is useless, confusing, and deprecated. Background: configure.in had a section, where it sets automatically USE_VFORK for macOS. if test "`uname -s`" = "Darwin" ; then ... AC_DEFINE(USE_VFORK, 1, [Should we use vfork() instead of fork()?]) ... However, Daniel Steffen has added the following section 17 years ago which effectively deactivated USE_VFORK for the x86_64 platform, when it is set, due to a bug report in RDAR (Apple's bug tracking system). 16 years ago, a section was added to deactivate USE_VFORK for all platforms with llvm-gcc-4.2 or newer. /* *--------------------------------------------------------------------------- * At present, using vfork() instead of fork() causes execve() to fail * intermittently on Darwin x86_64. rdar://4685553 *--------------------------------------------------------------------------- */ # if defined(__x86_64__) && !defined(FIXED_RDAR_4685553) # undef USE_VFORK # endif /* __x86_64__ */ /* Workaround problems with vfork() when building with llvm-gcc-4.2 */ # if defined (__llvm__) && \ (__GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 2 || \ (__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ > 0)))) # undef USE_VFORK # endif /* __llvm__ */ #endif /* __APPLE__ */ This means, that the last 17 years, USE_VFORK was not doing anything on macOS. Furthermore, macOS 12 (Monterey, released 2021) deprecated vfork() officially. Therefore, it is safe to remove the setting of USE_VFORK from the default configuration for macOS. It is still possible to set USE_VFORK manually for certain platforms if needed. - login: "gustafn3"
- mimetype: "text/plain"