[BusyBox 0000132]: Implement fork using longjmp

bugs at busybox.net bugs at busybox.net
Mon Feb 11 20:34:16 UTC 2008


The following issue has been REOPENED. 
====================================================================== 
http://busybox.net/bugs/view.php?id=132 
====================================================================== 
Reported By:                sjackman
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   132
Category:                   New Features
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     feedback
====================================================================== 
Date Submitted:             03-03-2005 16:24 PST
Last Modified:              02-11-2008 12:34 PST
====================================================================== 
Summary:                    Implement fork using longjmp
Description: 
I'm using busybox on a single process embedded system that does not have
the fork system call. This patch implements fork using longjmp when
CONFIG_FEATURE_IMPLEMENT_FORK_USING_LONGJMP is selected in the
configuration.

====================================================================== 

---------------------------------------------------------------------- 
 vda - 02-11-08 10:14  
---------------------------------------------------------------------- 
This appears to be a "vfork in userspace". Wow. But we already have
vfork... 

---------------------------------------------------------------------- 
 vapier - 02-11-08 11:31  
---------------------------------------------------------------------- 
i think the idea was vfork wasnt available either ... this was bare metal
code 

---------------------------------------------------------------------- 
 sjackman - 02-11-08 12:34  
---------------------------------------------------------------------- 
Exactly. This patch implemented vfork in userspace using longjmp for
platforms where vfork was not available. As a bonus, it was also much
faster (on some platforms) even where vfork was available. I can
confirm that I did actually get this crazy scheme to work, running
busybox on a 40 MHz ARM processor with only 1 MiB SRAM and 2 MiB
flash; try fitting Linux on that. I'm not using this patch anymore
though; so I'm not pushing to have it applied, but if someone else
ever wants to try the same thing, this patch would be a good place to
start.

Cheers,
Shaun 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
03-03-05 16:24  sjackman       New Issue                                    
03-03-05 16:24  sjackman       File Added: busybox-1.00-fork.diff               
    
03-16-05 12:27  andersen       Assigned To              andersen => BusyBox 
02-11-08 10:14  vda            Status                   assigned => closed  
02-11-08 10:14  vda            Note Added: 0004024                          
02-11-08 10:14  vda            Resolution               open => no change
required
02-11-08 11:31  vapier         Note Added: 0004094                          
02-11-08 12:34  sjackman       Status                   closed => feedback  
02-11-08 12:34  sjackman       Resolution               no change required =>
reopened
02-11-08 12:34  sjackman       Note Added: 0004114                          
======================================================================




More information about the busybox-cvs mailing list