REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 2.41 KB
Close
/proc/thread-self/root/opt/cpanel/ea-ruby27/root/usr/share/passenger/phusion_passenger/utils/native_support_utils.rb
Text
Base64
# Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2025 Asynchronous B.V. # # "Passenger", "Phusion Passenger" and "Union Station" are registered # trademarks of Asynchronous B.V. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'native_support' module PhusionPassenger module Utils # Utility functions that can potentially be accelerated by native_support functions. module NativeSupportUtils extend self if defined?(PhusionPassenger::NativeSupport) # Split the given string into an hash. Keys and values are obtained by splitting the # string using the null character as the delimitor. def split_by_null_into_hash(data) PhusionPassenger::NativeSupport.split_by_null_into_hash(data) end # Wrapper for getrusage(). def process_times PhusionPassenger::NativeSupport.process_times end else NULL = "\0".freeze class ProcessTimes < Struct.new(:utime, :stime) end def split_by_null_into_hash(data) args = data.split(NULL, -1) args.pop Hash[*args] end def process_times times = Process.times ProcessTimes.new((times.utime * 1_000_000).to_i, (times.stime * 1_000_000).to_i) end end end end # module Utils end # module PhusionPassenger
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ansi_colors.rb
4.87 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
download.rb
8.08 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
file_system_watcher.rb
6.25 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hosts_file_parser.rb
3.90 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
json.rb
4.96 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
lock.rb
1.91 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
native_support_utils.rb
2.41 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
progress_bar.rb
1.97 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
shellwords.rb
849 B
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
strscan.rb
1.97 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tee_input.rb
6.88 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
terminal_choice_menu.rb
6.05 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tmpio.rb
1.87 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
unseekable_socket.rb
8.65 KB
lrw-r--r--
2026-06-19 15:13:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).