diff --git a/test/parallel/test-cluster-bind-privileged-port.js b/test/parallel/test-cluster-bind-privileged-port.js index 1249230177d2ec..11a8aa6659335e 100644 --- a/test/parallel/test-cluster-bind-privileged-port.js +++ b/test/parallel/test-cluster-bind-privileged-port.js @@ -24,11 +24,10 @@ const common = require('../common'); const assert = require('assert'); const cluster = require('cluster'); const net = require('net'); -const { execSync } = require('child_process'); +const { readFileSync } = require('fs'); if (common.isLinux) { - const sysctlOutput = execSync('sysctl net.ipv4.ip_unprivileged_port_start').toString(); - const unprivilegedPortStart = parseInt(sysctlOutput.split(' ')[2], 10); + const unprivilegedPortStart = parseInt(readFileSync('/proc/sys/net/ipv4/ip_unprivileged_port_start')); if (unprivilegedPortStart <= 42) { common.skip('Port 42 is unprivileged'); }