From: Martin J. Zaidel
Subject: Binary permissions in Lucid
Date: 
Message-ID: <90243@netnews.upenn.edu>
Is there any way to change the permissions of the binary files
written by the Lucid compiler?  The default action is to write
them with permissions 0644.  I'd like to have them 0664.  Is
there a compiler option that I can set?

Thanks,

Martin
Martin J. Zaidel            | "We were once so close to Heaven
==> ······@cis.upenn.edu    |  Peter came out and gave us medals
			    |  Declaring us the nicest of the Damned."
Professional meaning junkie |                - They Might Be Giants
From: Len Charest
Subject: Re: Binary permissions in Lucid
Date: 
Message-ID: <1992Sep24.201731.11028@jpl-devvax.jpl.nasa.gov>
In article <·····@netnews.upenn.edu>, ······@muzungu.cis.upenn.edu (Martin J. Zaidel) writes:
|> 
|> Is there any way to change the permissions of the binary files
|> written by the Lucid compiler?  The default action is to write
|> them with permissions 0644.  I'd like to have them 0664.  Is
|> there a compiler option that I can set?

I don't know of any compiler settings, but you can hack the file umask on Unix by
putting advice on COMPILE-FILE:


;;; Lucid 4.0.2 compile-file hacks

#+lucid
(progn
	 
  (def-foreign-function (set-umask (:language :c)
				   (:name "_umask")
				   (:return-type :signed-32bit))
      (number :signed-32bit))

  (defadvice (compile-file force-umask-002) (file &rest args)
    (let (old-umask)
      (unwind-protect
	   (progn (setq old-umask (set-umask #o002))
		  (apply-advice-continue file args))
	(set-umask old-umask))))
  )
..................................................
                                  Len Charest, Jr.
                 JPL Artificial Intelligence Group
                          ·······@aig.jpl.nasa.gov