Skip to content

Instantly share code, notes, and snippets.

@qwwdfsad
Created August 15, 2017 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qwwdfsad/1b0d8ba61bb0d688d75672d2100aa371 to your computer and use it in GitHub Desktop.
Save qwwdfsad/1b0d8ba61bb0d688d75672d2100aa371 to your computer and use it in GitHub Desktop.
Index: src/jattach.c
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/jattach.c (revision 09e208d593344430de0bb7b4e72273cef93b29ff)
+++ src/jattach.c (revision )
@@ -150,6 +150,16 @@
return 1;
}
+#ifdef __APPLE__
+ char* path = argv[3];
+ char real_path[PATH_MAX];
+ if (!realpath(path, real_path)) {
+ perror("Cannot canonicalize path");
+ return 1;
+ }
+ argv[3] = real_path;
+#endif // __APPLE__
+
// Make write() return EPIPE instead of silent process termination
signal(SIGPIPE, SIG_IGN);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment