Process spawining

hi,
i have this prolem on my system
whnever a run a process on my linux machine it spawns 2 more of the same process.

say the process is x
then on running x i get 3 processes which are spawned by one another.
x
-x
--x

how do i stop this

Give us an example using the output of "ps aux"
Regards.

Does this happen for every login process? ie., you login and get three processes...

What does

ps

show for you right now?

Send us a "ptree" output so we can see the process relationship.

If you're running various shells, the #!/bin/Xsh directive will do this (normal).

Could be something funny in the script as well, or init issues.

If it's a runaway parent-child spawn loop, kill -KILL the topmost PID.
This can happen with alias loops and other bad programming.

-Phrazz

asamant 6228 0.0 0.1 46888 7500 pts/1 S 16:38 0:00 nameserv -OAhost 10.65.18.49 -OAport 12345
asamant 6233 0.0 0.1 46888 7500 pts/1 S 16:38 0:00 nameserv -OAhost 10.65.18.49 -OAport 12345
asamant 6234 0.0 0.1 46888 7500 pts/1 S 16:38 0:00 \_ nameserv -OAhost 10.65.18.49 -OAport 12345
asamant 6263 0.0 0.1 46888 7500 pts/1 S 16:39 0:00 \_ nameserv -OAhost 10.65.18.49 -OAport 12345
asamant 6321 0.0 0.1 46888 7500 pts/1 S 16:39 0:00 \_ nameserv -OAhost 10.65.18.49 -OAport 12345
asamant 6853 0.0 0.1 46888 7500 pts/1 S 16:39 0:00 \_ nameserv -OAhost 10.65.18.49 -OAport 12345
asamant 7379 0.0 0.1 46888 7500 pts/1 S 16:39 0:00 \_ nameserv -OAhost 10.65.18.49 -OAport 12345

This is what i get wen is do ps -fux

i started the process using this command

nameserv -OAhost 10.65.18.49 -OAport 12345&

That might be ists usual behaviour. It seems that this process is a network service (ORB name server, perhaps?), and the fact that it forks that way is to be able to process connections. Apache, for instance, does the same. You can set how many processes are created (max/min) through its config file. It's possible that you can do the same with this service. Are there any other processes that behave that way?
Regards.

this is just one example.most of the processes do the same thing

Well, that's not necessarily a bad behaviour. Perhaps you may want to show us the complete output of "ps auxf" :slight_smile:
Regards.

What model of threading does your system use -- linuxthreads or nptl? If it's the former, you might be seeing threads, not processes -- both show up in the process table. For nptl, threads do not show up in the process table. nptl is newer, and avoids some of linuxthreads' subtle design flaws.