BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000132 [BusyBox] New Features feature N/A 03-03-05 16:24 02-11-08 12:34
Reporter sjackman View Status public  
Assigned To BusyBox
Priority normal Resolution reopened  
Status feedback   Product Version 1.00
Summary 0000132: 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.
Additional Information config CONFIG_FEATURE_IMPLEMENT_FORK_USING_LONGJMP
    bool "Implement fork using longjmp"
    default n
    help
      Implement fork, exit, and waitpid using macros. This is most
      useful for systems missing these functions. Fork is implemented
      using setjmp and exit using longjump. The exit value can be
      returned by waitpid. The current implementation does not provide
      for nested forks.
Attached Files  busybox-1.00-fork.diff [^] (4,748 bytes) 03-03-05 16:24

- Relationships

- Notes
(0004024)
vda
02-11-08 10:14

This appears to be a "vfork in userspace". Wow. But we already have vfork...
 
(0004094)
vapier
02-11-08 11:31

i think the idea was vfork wasnt available either ... this was bare metal code
 
(0004114)
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


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker