Changeset 13225


Ignore:
Timestamp:
Nov 23, 2009, 5:16:11 PM (10 years ago)
Author:
rme
Message:

When prepending a "kernel" to a saved heap image, copy the execute
mode bits from the prepended file, rather than setting them
unconditionally. (Per gb's suggestion.)

Fixes ticket:629.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/dumplisp.lisp

    r13109 r13225  
    270270      (%delete-file filename))
    271271    (when prepend-fd
    272       (setq mode (logior #o111 mode)))
     272      ;; Copy the execute mode bits from the prepended "kernel".
     273      (let ((prepend-fd-mode (nth-value 1 (%fstat prepend-fd))))
     274        (setq mode (logior (logand prepend-fd-mode #o111) mode))))
    273275    (let* ((image-fd (fd-open filename (logior #$O_WRONLY #$O_CREAT) mode)))
    274276      (unless (>= image-fd 0) (signal-file-error image-fd filename))
Note: See TracChangeset for help on using the changeset viewer.