LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2015, 02:12 PM   #1
5883
Member
 
Registered: Aug 2004
Posts: 173

Rep: Reputation: 0
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 !

Last edited by 5883; 02-20-2015 at 02:15 PM.
 
Old 02-20-2015, 02:24 PM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,852
Blog Entries: 1

Rep: Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868Reputation: 1868
With gdb you can put breakpoint on fork.
 
Old 02-20-2015, 02:44 PM   #3
5883
Member
 
Registered: Aug 2004
Posts: 173

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by NevemTeve View Post
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.
 
Old 02-20-2015, 03:15 PM   #4
genss
Member
 
Registered: Nov 2013
Posts: 741

Rep: Reputation: Disabled
only fork and clone can create processes
threading is done with clone
 
Old 02-23-2015, 05:28 AM   #5
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Posts: 952

Rep: Reputation: 217Reputation: 217Reputation: 217
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

Last edited by AnanthaP; 02-23-2015 at 05:45 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] problem using signal(), kill() when creating multiple processes pfpietro Programming 3 08-22-2012 02:09 PM
creating processes in kernel mode using modules at runtime. rkemiset Linux - Kernel 0 08-05-2009 10:05 PM
creating sequential child processes using fork() BrokenFighter Programming 1 03-06-2007 10:11 PM
creating semaphores for multiple processes djgerbavore Programming 6 04-09-2006 09:07 PM
Creating Linux Processes using C indika7777 Programming 3 03-24-2004 11:27 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration