[Openmcl-devel] Command line argument behavior

Osei Poku osei.poku at gmail.com
Fri Jun 3 09:01:48 PDT 2011


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?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ccl-kernel.diff
Type: application/octet-stream
Size: 760 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20110603/5d7c3ab8/attachment.obj>
-------------- next part --------------


More information about the Openmcl-devel mailing list