This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fork() doesn't forks a new process.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
I'm using the 3.2 version of the gcc compiler in a RedHat 8.0 Linux box with 
the kernel 2.4.18-19.8.0.

I'm programming a concurrent TCP server daemon that forks a child process to 
service every connection it receives.

For this I use the fork() system call to create such child process, but I have 
observed that when I run the daemon and make a TCP connection over its TCP 
port, there is no new process in the system. Instead of the process a new 
thread is created.
Moreover, I have observed that when the daemon sends bytes to the client, the 
threat becomes a process.

Is this behavior normal ?
Who causes this behavior, the gcc code generated by the GCC or the linux 
Kernel 24.18 ?

Is it possible to advoid this behavior (with a gcc option, or modifying one of 
the /proc kernel parameters) ?
 
Greetings.
- ---
Carles Xavier Munyoz Baldó
carles@descom.es
Descom Consulting
Telf: +34 965861024
Fax: +34 965861024
http://www.descom.es/
- ---
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBPhrsAzvYAf7VZNaaEQJ3eACfXAZO48ciesLxaUC8o+Ch239vqq8AoPxl
86746YF+gxS4F4tDwSp0kxA7
=lA4a
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]