Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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