scsh-users
[Top] [All Lists]

Why is dump-scsh-program failing here?

To: scsh-users@scsh.net
Subject: Why is dump-scsh-program failing here?
From: Eric Hanchrow <offby1@blarg.net>
Date: Thu, 18 May 2006 22:48:42 -0700
Cancel-lock: sha1:ohvPKxr7L0e7OcYaTFZCUORaLdw=
List-id: <scsh-users.list-id.scsh.net>
Sender: news <news@sea.gmane.org>
This is 0.6.6.

Make this executable, make sure you don't have write access to /, then
execute it with no arguments.

    #!/usr/local/bin/scsh \
    -e compile -s
    !#

    (define (compile args)
      (with-cwd "/" 0)
      (dump-scsh-program main "plop"))

    (define (main args)
      'nada)

I see 

    Error: exception
           cannot-open-channel
           (write-image 13 "plop" '#{Procedure 3927 (unnamed in usual-resumer
    in usual-resumer)} "Scsh 0.6" "Permission denied")

But comment out the 'with-cwd' form, and it works.

Why is this happening?

-- 
There is such a thing as American-ness.  ... [H]ackers ... come
closest of any group I know to embodying it.  Closer, probably, than
the men running our government.
        -- Paul Graham

<Prev in Thread] Current Thread [Next in Thread>