[racket] Does anyone know how to use launcher/launcher?

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jun 14 21:34:03 EDT 2011

5 hours ago, Danny Yoo wrote:
> > I can see that an empty file has been constructed:
> >
> > ####################################
> > fermi ~/work/whalesong $ ls -l hi
> > -r-xr-xr-x 1 dyoo nogroup 0 Jun 14 15:49 hi*
> > ####################################
> >
> > At the very least, the executable bit is set.  I'm about to start
> > looking through the source to launcher/launcher to figure out
> > what's going on, but want to double check: am I misusing the
> > library?
> 
> Bug tracked!  There's a missing condition that needs to be added:
> the launcher library assumes that the template file is writable,
> because it uses copy-file to move it into the destination.  However,
> on my setup here in the Brown CS lab, the Racket installation is
> shared, and none of the collection files are user-writable.  So the
> template-writing function must use file-or-directory-permissions.

That's arguably a problem that your sysadmins created.  On linux, the
`sh' file is there so that it can be copied to create executable files
(since `file-copy' preserves the access bits) -- actually, it's there
only for that reason (since it predates the new permissions function).
So by explicitly chmodding the file down, they've broken this feature.

But given that we have that function now, I don't see any reason not
to make it more robust against over-protective administration -- I
added a variant of your patch: it turns on all bits, and it tries to
actually do the change only if the bits were missing.


> I was about to write a patch, but encountered what looks like a bug
> to me.  I've been staring at the bit patterns for read,write,execute
> in: [...]
> Is it just me, or are the bits for read and execute backwards?

Yeah, and I added to that fix -- the docs were broken too.

(All pushed now.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!



Posted on the users mailing list.