dcp-worker 4.3.7 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,6 +85,7 @@ Usage: ${process.argv[0]} [-h | --help] [--prefix=<dir>] [--pts=<dir>]
85
85
  [-s | --signal=[name or number][,<toggle|quick>]]
86
86
  [-T | --loadavg-type=<short,medium,long,random>]
87
87
  [-f | --pidfile=</path/to/file.pid>]
88
+ [--node=</path/to/node>]
88
89
  [-- <options to dcp-evaluator-start, must be last option>]
89
90
  Where:
90
91
  -i sets the idle timeout in seconds for tty sessions (${daemonConfig.session.idleTimeout}s)
@@ -106,6 +107,8 @@ Where:
106
107
  A value of zero disables this limit; the default value is ${daemonConfig.limits.maxLoad}.
107
108
  --loadavg-type determines how load is measured; 'short', 'medium', 'long',
108
109
  'random'. Random generates a load between 0 and 1 (${daemonConfig.limits.loadavgType}).
110
+ --node is the path to the node executable to spawn dcp-evaluator-start with;
111
+ default value is ${process.argv[0]}.
109
112
 
110
113
  -L only apply the limits when the monitors say the machine is busy
111
114
 
@@ -144,9 +147,11 @@ async function listenForConnections(config)
144
147
  {
145
148
  console.log('Using dynamic port', server.address().port);
146
149
  // Send info by IPC, if the spawn is setup for that. Probably don't need to try/catch.
150
+ /* WHAT IS THIS FOR? /wg feb 2026 */
147
151
  if (process.send)
148
152
  try { process.send(server.address().port); } catch (e) {}
149
153
  }
154
+
150
155
  console.log('Evaluator command is', config.proc, config.argv);
151
156
  });
152
157
  }
@@ -265,6 +270,9 @@ function handleConnection (socket, config)
265
270
  windowsHide: true,
266
271
  maxBuffer: 1024 * 1024 * 1024 * 2,
267
272
  };
273
+
274
+ if (daemonConfig.ldLibraryPath)
275
+ options.env['LD_LIBRARY_PATH'] = daemonConfig.ldLibraryPath;
268
276
  Object.apply(options, daemonConfig.spawnOptions);
269
277
  child = require('child_process').spawn(config.proc, config.argv, options);
270
278
  child.stderr.setEncoding('ascii');
@@ -575,7 +583,7 @@ async function main()
575
583
  utils.getoptParse(process.argv.slice(2), ''
576
584
  + 'h(help)P:(prefix)H:p:d:(disable-monitor)l:(max-load)r:(rate)'
577
585
  + 'Li:as:(signal)T:(loadavg-type)f:(pidfile)n(no-pidfile)'
578
- + '*:(logfile)*(overwrite-logfile)*:(syslog)*:(min-level)'))
586
+ + '*:(logfile)*(overwrite-logfile)*:(syslog)*:(min-level)*:(node)'))
579
587
  {
580
588
  switch (option)
581
589
  {
@@ -710,6 +718,12 @@ async function main()
710
718
  loggingOptions.minLevel[which] = level;
711
719
  break;
712
720
  }
721
+ case 'node':
722
+ {
723
+ daemonConfig.proc = optarg;
724
+ daemonConfig.ldLibraryPath = path.dirname(optarg);
725
+ break;
726
+ }
713
727
  case '--':
714
728
  daemonConfig.argv = daemonConfig.argv.concat(argvSegment); /* All options after -- pass to dcp-evaluator-start */
715
729
  break;
@@ -59,6 +59,7 @@ function main()
59
59
  evaluator: path.join('bin', 'dcp-evaluator'), /* resolved against prefix later */
60
60
  verbose: 0,
61
61
  };
62
+ let files = []; /* Startup files passed to evaluator as supplementary arguments */
62
63
 
63
64
  function help() {
64
65
  const binName = path.basename(__filename);
@@ -82,6 +83,8 @@ Options:
82
83
  ${options.sandboxDefinitions}
83
84
  --sandbox-libexec-dir= Location of sandbox setup files; default is
84
85
  ${options.sandboxLibexecDir}
86
+ --additional-files= Additional files to concat before the normal sandbox setup
87
+ files. Expects absolute paths
85
88
  -D, --dump Dump configuration to stdout and exit
86
89
  -T, --dump-types Dump list of known sandbox types to stdout and exit
87
90
  -F, --dump-files Dump list of startup files which would be passed
@@ -109,7 +112,7 @@ Options:
109
112
  + 'h(help)P:(prefix)p:(port)s(stdio)e:(evaluator)r:(rEvaluator)'
110
113
  + '*:(sandbox-libexec-dir)*:(sandbox-definitions)t:(sandbox-type)'
111
114
  + 'D(dump)T(dump-types)F(dump-files)J(json)v(verbose)f:(pidfile)d:(logLevel)'
112
- + '*:(logfile)*(overwrite-logfile)*:(syslog)*:(min-level)'))
115
+ + '*:(logfile)*(overwrite-logfile)*:(syslog)*:(min-level)*:(additional-files)'))
113
116
  {
114
117
  switch (option)
115
118
  {
@@ -190,6 +193,11 @@ Options:
190
193
  loggingOptions.minLevel[which] = level;
191
194
  break;
192
195
  }
196
+ case 'additional-files':
197
+ {
198
+ files.push(optarg);
199
+ break;
200
+ }
193
201
  case '--':
194
202
  options.evaluatorOptions = argvSegment; /* after --, pass to evaluator as-is */
195
203
  break;
@@ -210,7 +218,6 @@ Options:
210
218
  panic(`Invalid sandbox type: ${options.sandboxType}`);
211
219
 
212
220
  let args = []; /* Command-line arguments to pass to evaluator */
213
- let files = []; /* Startup files passed to evaluator as supplementary arguments */
214
221
 
215
222
  if (!options.stdio && options.port)
216
223
  args = args.concat(['-p', options.port]);