Bug 194858 - Patch tmux to utilize kern.proc.cwd sysctl
Summary: Patch tmux to utilize kern.proc.cwd sysctl
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Pietro Cerutti
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-06 08:52 UTC by Tiwei Bie
Modified: 2014-11-06 15:19 UTC (History)
1 user (show)

See Also:


Attachments
patch for tmux (726 bytes, text/plain)
2014-11-06 08:52 UTC, Tiwei Bie
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiwei Bie 2014-11-06 08:52:18 UTC
Created attachment 149122 [details]
patch for tmux

sysctl kern.proc.cwd has been added in r274167.

This patch utilizes the new sysctl to obtain the current working directory of
given process which could save a lot of overhead over kern.proc.filedesc if 
the given proc has a lot of open fds.

The patch is against tmux-1.9a [1].

This job is done as part of JuniorJobs [2].

[1] http://cznic.dl.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz
[2] https://wiki.freebsd.org/JuniorJobs#sysctl_reporting_current_working_directory
Comment 1 Pietro Cerutti freebsd_committer freebsd_triage 2014-11-06 10:43:20 UTC
I'd rather not keep this patch locally. Would you please report this upstream?

http://sourceforge.net/p/tmux/tickets/
Comment 2 Tiwei Bie 2014-11-06 11:09:40 UTC
(In reply to Pietro Cerutti from comment #1)
> I'd rather not keep this patch locally. Would you please report this
> upstream?
> 
> http://sourceforge.net/p/tmux/tickets/

Yeah, I will!
Comment 3 Tiwei Bie 2014-11-06 14:08:30 UTC
(In reply to Pietro Cerutti from comment #1)
> I'd rather not keep this patch locally. Would you please report this
> upstream?
> 
> http://sourceforge.net/p/tmux/tickets/

Accepted by upstream:

https://sourceforge.net/p/tmux/tickets/165/
Comment 4 Pietro Cerutti freebsd_committer freebsd_triage 2014-11-06 15:07:15 UTC
Great, thanks a lot! I think we can wait for the next tmux release to have it, ok?
Comment 5 Tiwei Bie 2014-11-06 15:19:24 UTC
(In reply to Pietro Cerutti from comment #4)
> Great, thanks a lot! I think we can wait for the next tmux release to have
> it, ok?

Yeah, of course! ;-)