child_process: fix O(n*m) scan of cmd string
authorBen Noordhuis <info@bnoordhuis.nl>
Thu, 11 Apr 2013 11:50:45 +0000 (13:50 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 11 Apr 2013 11:53:18 +0000 (13:53 +0200)
commit212eb8a52e835e3a8e71742fc557b0f4a43bf21c
tree92f66c31ec17d649dc2f2671d0931bc659fd71c5
parentdbbfbe74caa8d5e76d32222735766435682b2b94
child_process: fix O(n*m) scan of cmd string

Don't scan the whole string for a "NODE_" substring, just check that
the string starts with the expected prefix.

This is a reprise of dbbfbe7 but this time for the child_process
module.
lib/child_process.js