This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
fork() doesn't forks a new process.
- From: Carles Xavier Munyoz =?utf-8?q?Bald=C3=B3?= <carles at descom dot es>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 7 Jan 2003 16:02:26 +0100
- Subject: fork() doesn't forks a new process.
- Organization: DESCOM
- Reply-to: carles at descom dot es
-----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-----