I have a fairly simple C++ program which only takes one argument that is a Base64 encoded string. I can call the program.
I am now trying to call this program using Node.js' child_process.spawn(), but it is throwing an "E2BIG" error when I pass in the same Base64 string.
The Base64 string I am testing with is 305016 bytes in length.
Running getconf ARG_MAX
on my Linux box returns 2097152.
Why does child_process throw the error?
MAX_ARG_STRLEN
as the maximum length of a string argument. – Grapplinglet child = require('child_process').spawn('myprogram'); child.stdin.write(largeBase64String); child.stdin.end();
this code is not working? – Workhorse