LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Who is creating processes in my c code ? (https://www.linuxquestions.org/questions/programming-9/who-is-creating-processes-in-my-c-code-4175534640/)

5883 02-20-2015 02:12 PM

Who is creating processes in my c code ?
 
Hi i have a pretty complicated c code, the binary runs fine in a 64-bit ubuntu, only 1 process of itself.

When i run it in the same 32-bit ubuntu it built from, it spawns 10 processes of itself (view by using "ps -ef").

i put printf in the places of fork(), execvp(), but cannot see any of my debug info. Did search for "exec" as well.

So who is creating processes in my c code ?

thanks !

NevemTeve 02-20-2015 02:24 PM

With gdb you can put breakpoint on fork.

5883 02-20-2015 02:44 PM

Quote:

Originally Posted by NevemTeve (Post 5320737)
With gdb you can put breakpoint on fork.

haven't try that, but at least should be able to see my debug info, if fork() really gets called.

genss 02-20-2015 03:15 PM

only fork and clone can create processes
threading is done with clone

AnanthaP 02-23-2015 05:28 AM

In conjunction with the 32 bits OS and it's parameters, your executable is creating processes (based upon but not in your c code) You should check whether you have recompiled all modules with appropriate libraries for the 32 bit environment.

OK


All times are GMT -5. The time now is 06:49 AM.