GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: assume priv ports start at 1024 if it can't be changed · nodejs/node@3fdcf7b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-cluster-bind-privileged-port.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-cluster-bind-privileged-port.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-bind-privileged-port.js
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ const net = require('net');
2727
const { readFileSync } = require('fs');
2828

2929
if (common.isLinux) {
30-
const unprivilegedPortStart = parseInt(readFileSync('/proc/sys/net/ipv4/ip_unprivileged_port_start'));
31-
if (unprivilegedPortStart <= 42) {
32-
common.skip('Port 42 is unprivileged');
30+
try {
31+
const unprivilegedPortStart = parseInt(readFileSync('/proc/sys/net/ipv4/ip_unprivileged_port_start'));
32+
if (unprivilegedPortStart <= 42) {
33+
common.skip('Port 42 is unprivileged');
34+
}
35+
} catch {
36+
// Do nothing, feature doesn't exist, minimum is 1024 so 42 is usable.
37+
// Continue...
3338
}
3439
}
3540

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.