access bash from C program?

Michael ODonnell michael.odonnell at comcast.net
Mon Jun 2 13:16:30 EDT 2008



If I understand the requirements all you need to do is feed
the appropriate ulimit command to the same instance of bash
that ultimately executes the program you're trying to run,
right?  One simple approach sketched in pseudo-C would be:

   system( "/bin/bash -c 'yourUlimitCommandHere ; yourDesiredProgramHere'" );

...with a concrete example being:

   system( "/bin/bash -c 'ulimit -s 30000 ; /bin/date'" );
 


More information about the gnhlug-discuss mailing list