by dmklementiev » Fri Aug 23, 2019 6:34 pm
Thank you for the reply. Assuming that I my understanding of what "throwing away" means - yes I am completely ignoring argv in main. To add to it: std::vector<char*> argv_cstr in function Process LaunchProcess has the following values:
/home/dmitri/MSAL/CEF/cefsample/bin/cefsimple
--type=zygote
--no-sandbox
--log-file=/home/dmitri/MSAL/CEF/cefsample/bin/debug.log
--lang=en-US
And this is the process that just creates child process recursively with the same parameters. I checked the tree in htop. Am I correct that this is happening because all those params are ignored in child process(es) and if yes, what would be the best way to address it?
My original problem is that I want to create dll (.so) that provides cef functionality and I won't know how it will be called, so I am trying to run cefsimple with int main() - just to try how it is going to work). When I try to use char *argvLocal[] to initilize CefMainArgs(1,argvLocal), then void setproctitle(const char* fmt, ...) (in /services/service_manager/embedder/set_process_title_linux.cc) throws SIGSEGV at line memset(g_main_argv[0], 0, avail_size). My guess this is hapenning because value of avail_size is too big.