Hi Stephane,
with a small test-application I see the same problem (using MMU
and fork()).
My first impression is that this happens if you want to share
only a pointer. You could try sharing other "padding"- variables (use
them in the child). Some addresses look strange in the childs process. I didn't
dig deeper yet.
Carsten
De:
owner-microblaze-uclinux@xxxxxxxxxxxxxx
[mailto:owner-microblaze-uclinux@xxxxxxxxxxxxxx] En nombre de sgomes@xxxxxxxxxxx
Enviado el: martes, 03 de marzo de 2009 15:06
Para: microblaze-uclinux@xxxxxxxxxxxxxx
Asunto: [microblaze-uclinux] PPPD problem with fork()
Hi,
I currently use
the petalinux system with MMU support. I use the sources files retrieved from
petalinux-mmu-v0.10.tar.gz and not the latest sources files.
When I try to
use pppd application to communicate with a modem, I have a bug.
I use pppd with
the connect option which gives pppd a command to execute. This command
is executed using a fork() and execv().
The problem is
that after the fork() call, in the created child, the pointers, pointing on
strings in the parent, point on a NULL pointer.
But if I
compile pppd with #define __uCLinux__ which implies to use a
vfork() instead a fork(), pppd runs properly.
Has someone met
the same problem in pppd or in other applications using a fork()?
Regards,
Stephane