process run does not return

Hi everyone,

I am currently trying to send a simple post request via curl on my arduino yun

The problem is that the function simply does not return, the request execute succesfully, as i can see that the data has been send to the API, but then nothing.
On the serial window, the only thing i can see is the “a” that i output before the line, and then it blocks here.

Does any one have an idea ?

Thanks in advance, here is the code :

#include <Bridge.h>

void setup() {

void loop() {
  Process p;
  String startString;


have a good day !

Hi, I don't use the run() anymore.

  p.runShellCommand(F( "curl -H Content-type-application/json -X POST -d {\"hardware_id\":\"1\",\"hardware_name\":\"TEST#1\",\"value\":\"1\",\"type_value\":\"CO\"}"));

  while(p.available() > 0)
    char c =;
    SerialUSB.print( c);

I have never tried such a long command with runShellCommand.

Hey Koepel, thanks for the answer.

It does the same thing with the command :

 p.runShellCommand(F( "curl -H Content-type:application/json -X POST -d '{\"hardware_id\":\"1\",\"hardware_name\":\"TEST#1\",\"value\":\"1\",\"type_value\":\"CO\"}'"));

the api does receive the data, but it stops after the command :(

when i look at the logs from the api, the body that is returned from the request is pretty huge, could it have something to do with that ?

Hi, I've found the solution, the return from the API was indeed to big, so i had to remove the body, now it works as expected. I saw a post on the forum talking about that (, i tried to update the bridge library but it changed nothing.

Hope it will help someone, one day.

If you have a huge response, then yes, I suppose it is likely for the process output buffer to fill up and stall things until you can read from the buffer. But with the .run() command, you will never return to where you can read the output.

A solution may be to use the .runAsynchronously() version. That will return to the script, and where you can use .available() to check for data ready to be read, and then read and process or discard the data. Keep doing this as long as .running() returns true. Once .running() returns false, the process is done, and you will be at the point where you would be after the .run() command returns.

Or, write a script on the Linux side to call the curl command and do whatever processing you want on the returned output, and just return the digested part of the output that you want (if any) to the sketch.