sionescu / iolib

Common Lisp I/O library
http://common-lisp.net/project/iolib/
MIT License
141 stars 31 forks source link

execve and execvpe #18

Closed guicho271828 closed 9 years ago

guicho271828 commented 9 years ago

Is there any specific reason for excluding execve and execvpe while there is execvp and execv in iolib.syscalls? Iolib is already providing a reliable set of system calls and I hope it could be much more complete.

sionescu commented 9 years ago

execvpe(3) is a GNU extension, and nobody ever requested execve(3)

guicho271828 commented 9 years ago

I withdraw request on execvpe, yes, sure it is a GNU extension and I did not recognize that. In contrast, execve is a system call and more fundamental than execvp and execv, so maybe worth consideration...

I wonder which of iolib and osicat is appropriate for system programming. iolib says it is an I/O library, and it sounds like not really an interface to the system. osicat is an OS layer, but some important constants like WIFCONTINUED, O_RDONLY seems missing. I feel there is a duplicated work and I wish they could be somehow merged into one.

guicho271828 commented 9 years ago

actually it is just

(defsyscall (execve "execve") :int (path sstring) (argv :pointer) (envp :pointer))

I hope it helps.

sionescu commented 9 years ago

Thanks @guicho271828, I committed this change.

The difference between Osicat and IOlib is that Osicat simply adds functionality that the CL standard does not have and reuses CL data types like pathnames and streams, whereas IOlib is a complete reimplementation of all I/O functionality. If you look into Osicat, you can see that I did a lot of work on it then decided that it wasn't the right direction and moved a lot of the code into IOlib.