Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

use of vfork() instead of fork() in uClinux

Altera_Forum
Honored Contributor II
1,286 Views

Hi all, 

 

I ported pppd from busybox on the Nios2. Actually, I just did two things : 

- add the -Wl,-elf2flt linker flags to convert the binary file 

- changed calls to fork() by vfork() 

 

It seems everything goes right, but I wonder if it is authorized to use vfork() instead of fork() ? Do I risk anything by doing this ? Do I have to expect pppd to crash, or is it completely safe ? 

 

Thanks for any comments, 

 

Regards 

 

Pod
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
595 Views

You aren't supposed to change all of hte calls manually in the source code.. you can add a compile flag -Dfork=vfork ... or something like that (look at the compile for busybox). That will automatically change them for you. But it should be safe doing this, in most instances..

0 Kudos
Reply