Opened 10 years ago

Closed 10 years ago

#864 closed enhancement (duplicate)

Command line processing for SAVE-APPLICATION

Reported by: opoku Owned by:
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: 1.5
Keywords: Cc:


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.

Attachments (1)

ccl-kernel.diff (760 bytes) - added by opoku 10 years ago.

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by opoku

comment:1 Changed 10 years ago by rme

  • Resolution set to duplicate
  • Status changed from new to closed

We recommend using a shell wrapper. See ticket:605 (which is about the same issue you raise).


exec /path/to/my-ccl -n -- "$@"
Note: See TracTickets for help on using tickets.