Skip to content

Commit

Permalink
[OSX] proc.c: Fix goo.gl link in comment for source reference (#2505)
Browse files Browse the repository at this point in the history
  • Loading branch information
korli authored Feb 11, 2025
1 parent 17e2780 commit eee09da
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion psutil/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def bcat(fname, fallback=_DEFAULT):


def bytes2human(n, format="%(value).1f%(symbol)s"):
"""Used by various scripts. See: http://goo.gl/zeJZl.
"""Used by various scripts. See: https://code.activestate.com/recipes/578019-bytes-to-human-human-to-bytes-converter/?in=user-4178764.
>>> bytes2human(10000)
'9.8K'
Expand Down
2 changes: 1 addition & 1 deletion psutil/_pslinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ def memory_full_info(self):
def memory_maps(self):
"""Return process's mapped memory regions as a list of named
tuples. Fields are explained in 'man proc'; here is an updated
(Apr 2012) version: http://goo.gl/fmebo.
(Apr 2012) version: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/proc.txt?id=b76437579d1344b612cf1851ae610c636cec7db0.
/proc/{PID}/smaps does not exist on kernels < 2.6.14 or if
CONFIG_MMU kernel configuration option is not enabled.
Expand Down
2 changes: 1 addition & 1 deletion psutil/_pssunos.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def cwd(self):
# /proc/PID/path/cwd may not be resolved by readlink() even if
# it exists (ls shows it). If that's the case and the process
# is still alive return None (we can return None also on BSD).
# Reference: http://goo.gl/55XgO
# Reference: https://groups.google.com/g/comp.unix.solaris/c/tcqvhTNFCAs
procfs_path = self._procfs_path
try:
return os.readlink(f"{procfs_path}/{self.pid}/path/cwd")
Expand Down
4 changes: 2 additions & 2 deletions psutil/arch/osx/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ psutil_proc_threads(PyObject *self, PyObject *args) {
/*
* Return process open files as a Python tuple.
* References:
* - lsof source code: http://goo.gl/SYW79 and http://goo.gl/m78fd
* - lsof source code: https://github.com/apple-opensource/lsof/blob/28/lsof/dialects/darwin/libproc/dproc.c#L342
* - /usr/include/sys/proc_info.h
*/
PyObject *
Expand Down Expand Up @@ -854,7 +854,7 @@ psutil_proc_open_files(PyObject *self, PyObject *args) {
* Return process TCP and UDP connections as a list of tuples.
* Raises NSP in case of zombie process.
* References:
* - lsof source code: http://goo.gl/SYW79 and http://goo.gl/wNrC0
* - lsof source code: https://github.com/apple-opensource/lsof/blob/28/lsof/dialects/darwin/libproc/dproc.c#L342
* - /usr/include/sys/proc_info.h
*/
PyObject *
Expand Down

0 comments on commit eee09da

Please sign in to comment.