FreeBSD Bugzilla – Attachment 149122 Details for
Bug 194858
Patch tmux to utilize kern.proc.cwd sysctl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
patch for tmux
0001-Use-sysctl-kern.proc.cwd-to-get-current-working-dire.patch (text/plain), 726 bytes, created by
Tiwei Bie
on 2014-11-06 08:52:18 UTC
(
hide
)
Description:
patch for tmux
Filename:
MIME Type:
Creator:
Tiwei Bie
Created:
2014-11-06 08:52:18 UTC
Size:
726 bytes
patch
obsolete
> >diff --git a/osdep-freebsd.c b/osdep-freebsd.c >index d596eab..46f6f3f 100644 >--- a/osdep-freebsd.c >+++ b/osdep-freebsd.c >@@ -132,6 +132,21 @@ error: > return (NULL); > } > >+#ifdef KERN_PROC_CWD >+char * >+osdep_get_cwd(int fd) >+{ >+ static struct kinfo_file info; >+ int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_CWD, 0 }; >+ size_t len = sizeof info; >+ >+ if ((name[3] = tcgetpgrp(fd)) == -1) >+ return (NULL); >+ if (sysctl(name, 4, &info, &len, NULL, 0) != 0) >+ return (NULL); >+ return (info.kf_path); >+} >+#else /* !KERN_PROC_CWD */ > char * > osdep_get_cwd(int fd) > { >@@ -157,6 +172,7 @@ osdep_get_cwd(int fd) > free(info); > return (NULL); > } >+#endif /* KERN_PROC_CWD */ > > struct event_base * > osdep_event_init(void) >-- >2.1.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 194858
: 149122