From 9ec52963b585e822e87bdc5de28d6143aff0d2e5 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Fri, 18 Oct 2013 13:17:48 -0700 Subject: [PATCH 1/3] 2013.10.19, Version 0.10.18 (Stable) Changes since version 0.10.17: * unix: fix uv_spawn() NULL pointer deref on ENOMEM (Ben Noordhuis) * unix: don't close inherited fds on uv_spawn() fail (Ben Noordhuis) * unix: revert recent FSEvent changes (Ben Noordhuis) * unix: fix non-synchronized access in signal.c (Ben Noordhuis) --- ChangeLog | 13 +++++++++++++ src/version.c | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e20f002d..794764e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2013.10.19, Version 0.10.18 (Stable) + +Changes since version 0.10.17: + +* unix: fix uv_spawn() NULL pointer deref on ENOMEM (Ben Noordhuis) + +* unix: don't close inherited fds on uv_spawn() fail (Ben Noordhuis) + +* unix: revert recent FSEvent changes (Ben Noordhuis) + +* unix: fix non-synchronized access in signal.c (Ben Noordhuis) + + 2013.09.25, Version 0.10.17 (Stable), 9670e0a93540c2f0d86c84a375f2303383c11e7e Changes since version 0.10.16: diff --git a/src/version.c b/src/version.c index be1729a5..e272d5f4 100644 --- a/src/version.c +++ b/src/version.c @@ -35,7 +35,7 @@ #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 10 #define UV_VERSION_PATCH 18 -#define UV_VERSION_IS_RELEASE 0 +#define UV_VERSION_IS_RELEASE 1 #define UV_VERSION ((UV_VERSION_MAJOR << 16) | \ From 939560b6dbbb52252a3d510731431c7c9e03750c Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Fri, 18 Oct 2013 13:17:52 -0700 Subject: [PATCH 2/3] Now working on v0.10.19 --- ChangeLog | 2 +- src/version.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 794764e7..0cb89eaa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2013.10.19, Version 0.10.18 (Stable) +2013.10.19, Version 0.10.18 (Stable), 9ec52963b585e822e87bdc5de28d6143aff0d2e5 Changes since version 0.10.17: diff --git a/src/version.c b/src/version.c index e272d5f4..742f5a1e 100644 --- a/src/version.c +++ b/src/version.c @@ -34,8 +34,8 @@ #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 10 -#define UV_VERSION_PATCH 18 -#define UV_VERSION_IS_RELEASE 1 +#define UV_VERSION_PATCH 19 +#define UV_VERSION_IS_RELEASE 0 #define UV_VERSION ((UV_VERSION_MAJOR << 16) | \ From 08e0e63f3adecafeacaf09f519587c381c6e2ef2 Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Mon, 28 Oct 2013 20:51:50 +0400 Subject: [PATCH 3/3] darwin: avoid calling GetCurrentProcess Use some black-magic from Apple to change process name without getting a "Not responding" tag from Activity Manager. fix #966 --- src/unix/darwin-proctitle.c | 42 ++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/src/unix/darwin-proctitle.c b/src/unix/darwin-proctitle.c index c3171a61..037acffb 100644 --- a/src/unix/darwin-proctitle.c +++ b/src/unix/darwin-proctitle.c @@ -36,14 +36,22 @@ int uv__set_process_title(const char* title) { CFStringRef, CFStringRef, CFDictionaryRef*); + typedef CFDictionaryRef (*LSApplicationCheckInType)(int, CFDictionaryRef); + typedef OSStatus (*SetApplicationIsDaemonType)(int); + typedef void (*LSSetApplicationLaunchServicesServerConnectionStatusType)( + uint64_t, void*); CFBundleRef launch_services_bundle; LSGetCurrentApplicationASNType ls_get_current_application_asn; LSSetApplicationInformationItemType ls_set_application_information_item; CFStringRef* display_name_key; - ProcessSerialNumber psn; CFTypeRef asn; CFStringRef display_name; OSStatus err; + CFBundleRef hi_services_bundle; + LSApplicationCheckInType ls_application_check_in; + SetApplicationIsDaemonType set_application_is_daemon; + LSSetApplicationLaunchServicesServerConnectionStatusType + ls_set_application_launch_services_server_connection_status; launch_services_bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.LaunchServices")); @@ -71,8 +79,36 @@ int uv__set_process_title(const char* title) { if (display_name_key == NULL || *display_name_key == NULL) return -1; - /* Force the process manager to initialize. */ - GetCurrentProcess(&psn); + /* Black 10.9 magic, to remove (Not responding) mark in Activity Monitor */ + hi_services_bundle = + CFBundleGetBundleWithIdentifier(CFSTR("com.apple.HIServices")); + if (hi_services_bundle == NULL) + return -1; + + set_application_is_daemon = CFBundleGetFunctionPointerForName( + hi_services_bundle, + CFSTR("SetApplicationIsDaemon")); + ls_application_check_in = CFBundleGetFunctionPointerForName( + launch_services_bundle, + CFSTR("_LSApplicationCheckIn")); + ls_set_application_launch_services_server_connection_status = + CFBundleGetFunctionPointerForName( + launch_services_bundle, + CFSTR("_LSSetApplicationLaunchServicesServerConnectionStatus")); + if (set_application_is_daemon == NULL || + ls_application_check_in == NULL || + ls_set_application_launch_services_server_connection_status == NULL) { + return -1; + } + + if (set_application_is_daemon(1) != noErr) + return -1; + + ls_set_application_launch_services_server_connection_status(0, NULL); + + /* Check into process manager?! */ + ls_application_check_in(-2, + CFBundleGetInfoDictionary(CFBundleGetMainBundle())); display_name = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8); asn = ls_get_current_application_asn();