[cffi-devel] Using the exec() family of functions

Luís Oliveira luismbo at gmail.com
Mon Mar 30 12:54:18 UTC 2009


On Sun, Mar 29, 2009 at 11:11 AM, Leslie P. Polzer
<sky at viridian-project.de> wrote:
> Perhaps one of you guys can spot mistakes here:
[...]
> CL-USER(14): (execv "/bin/chmod" (null-pointer))

That should be something like:

      (with-foreign-object (args :string 2)
        (setf (mem-aref args :string 0) "/bin/chmod")
        (setf (mem-aref args :pointer 1) (null-pointer))
        (execv "/bin/chmod" args))

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/




More information about the cffi-devel mailing list