[racket] Too Many Redirects (Apache)
On Sep 16, 2011, at 11:03 AM, Jay McCarthy wrote:
> I think you can use ffi-lib with #f because it is already attached.
Yeah, okay, looks like this works:
#lang racket
(require ffi/unsafe)
;; return type is "gid_t". Safe to use int?
(define setuid
(get-ffi-obj "setuid" (ffi-lib #f)
(_fun _int -> _int)))
(setuid 0)
... naturally, the setuid 0 fails, you'd have to start as root and go down. Also, you'd need to do that *after* the listen on port 80.
John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4624 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20110916/b8d92eaf/attachment.p7s>