Attached you will find the test. Make it with the default Makefile generated by petalinux-new-app. Btw: I'm using a petalinux-mmu-v0.10 on a Sp3A-DSP-1800A-Starter. It was only tested on my platform, not on a reference platform. This following text is the output after a normal make: # /ua/process-test/process-test the main program process ID is 104 before forking: textptr=bf907e00 &textptr=bf907df8 *textptr=I am a stupid text. before forking: numpointer=bf907df4 &numptr=bf907dfc *numptr=9876 before forking: number=9876 &number=bf907df4 this is the parent process, with id 104 the child's process ID is 105 parent : textptr=bf907e00 &textptr=bf907df8 *textptr=I am a stupid text. parent : numptr=bf907df4 &numptr=bf907dfc *numptr=9876 parent : number=9876 &number=bf907df4 this is the child process, with id 105 child : textptr=bf907e00 &textptr=2 *textptr=I am a stupid text. child : numptr=bf907df4 &numptr=0 *numptr=9876 child : number=9876 &number=0 The following text is the output after removing the -Os option: # /ua/process-test/process-test the main program process ID is 106 before forking: textptr=bfa67e04 &textptr=bfa67e1c *textptr=I am a stupid text. before forking: zahlpointer=bfa67e18 &numptr=bfa67e20 *numptr=9876 before forking: number=9876 &number=bfa67e18 this is the parent process, with id 106 the child's process ID is 107 parent : textptr=bfa67e04 &textptr=bfa67e1c *textptr=I am a stupid text. parent : numptr=bfa67e18 &numptr=bfa67e20 *numptr=9876 parent : number=9876 &number=bfa67e18 this is the child process, with id 107 child : textptr=bfa67e04 &textptr=bfa67e1c *textptr=I am a stupid text. child : numptr=bfa67e18 &numptr=bfa67e20 *numptr=9876 child : number=9876 &number=bfa67e18 The difference is the addresses. In the child process the content is there but the addresses are lost. -----Mensaje original----- De: owner-microblaze-uclinux@xxxxxxxxxxxxxx [mailto:owner-microblaze-uclinux@xxxxxxxxxxxxxx] En nombre de John Williams Enviado el: jueves, 12 de marzo de 2009 12:06 Para: microblaze-uclinux@xxxxxxxxxxxxxx Asunto: Re: [microblaze-uclinux] PPPD problem with fork() Hi Carsten, On Wed, Mar 4, 2009 at 1:07 AM, Bartsch Carsten <cbartsch@xxxxxxxxxx> wrote: > 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. Can you please post this test app? The smaller the better :) Thanks, John ___________________________ microblaze-uclinux mailing list microblaze-uclinux@xxxxxxxxxxxxxx Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
Attachment:
process-test.c
Description: process-test.c