[Openmcl-devel] Command line argument behavior

Osei Poku osei.poku at gmail.com
Fri Jun 3 16:08:31 UTC 2011


Update: added to trac.

On Jun 3, 2011, at 12:01 PM, Osei Poku wrote:

> Hi,
> 
> When building a standalone binary using SAVE-APPLICATION and :PREPEND-KERNEL T, I found the command line argument processing of the resulting binary undesirable. I have a patch that solves the problem for me, however, it might not be the best way of doing things. 
> 
> The problem as I see it is as follows: When only one argument (which does not begin with a '-') is provided to a binary which consists of (kernel + heap-image), the current kernel code automatically tries to load that argument as the image even though it should clearly use the image attached to the binary itself. As a result, one has to always use the '--' argument to end processing of the kernel arguments. This behavior is not expected for unix command line tools and shouldn't be expected here either IMHO.
> 
> The attached patch provides a sub-optimal solution which basically detects the case when the heap image is already included in the binary and so does not try to load the image from that first argument. The problem with this is that since '--' is not required, other kernel level command line flags, such as -I, -R, -S, etc, that are not passed on to the application may cause some confusion. 
> 
> Another solution is to completely disable those kernel level flags if the heap image is attached to the kernel, but the loss of control over those parameters is also undesirable.
> 
> Any other suggestions?
> 
> 
> <ccl-kernel.diff>
> 
> 
> 
> Osei




More information about the Openmcl-devel mailing list