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

Leslie P. Polzer sky at viridian-project.de
Sun Mar 29 10:11:29 UTC 2009


Hi,

I have tried to use execv() from glibc in SBCL, but it's either
not compatible with SBCL for some reason or I'm not calling it
correctly.

Perhaps one of you guys can spot mistakes here:


CL-USER(2): (use-package :cffi)

T
CL-USER(3): (define-foreign-library libc (:unix "libc.so.6"))

LIBC
CL-USER(4): (use-foreign-library libc)

#<CFFI::FOREIGN-LIBRARY {B277599}>
CL-USER(7): (defcfun "execv" :int (path :string) (args :pointer))

EXECV
CL-USER(14): (execv "/bin/chmod" (null-pointer))
zsh: segmentation fault  rlwrap sbcl

  Leslie

-- 
LinkedIn Profile: http://www.linkedin.com/in/polzer
Xing Profile: https://www.xing.com/profile/LeslieP_Polzer
Blog: http://blog.viridian-project.de/





More information about the cffi-devel mailing list