[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

System Scheme (was Re: GOOPS Terminal Class - RnRS POSIX support)

From: Michael Tiedtke
Subject: System Scheme (was Re: GOOPS Terminal Class - RnRS POSIX support)
Date: Tue, 23 Jun 2015 21:16:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 23/06/2015 20:09, Marko Rauhamaa wrote:
Eli Zaretskii <address@hidden>:

From: Marko Rauhamaa <address@hidden>
Date: Tue, 23 Jun 2015 11:08:23 +0300
Cc: address@hidden

Michael Tiedtke <address@hidden>:
POSIX isn't that important or useful anymore but "full access to
POSIX system calls" it has never been.
What I'd like is a way to communicate open file descriptors between
That's highly non-portable, and is bound to produce Guile code that
works only on some systems.
I'd like to produce Guile code that works on Linux. As it stands, I

Sending file descriptors over Unix domain sockets is quite portable,
however. Guile does support AF_UNIX, only it doesn't support control


My solution to this is even less portable but it would reduce the amount primitives:

Just make direct kernel calls from within Guile. It shouldn't be too difficult to create a byte vector (or SMOB) and fill it with the data needed according to the SYSCALL with the corresponding system scheme or byte/word procedures. Then do the SYSCALL. After that SYSCALL you would need to read out the data from the byte vector when there is an answer. That way you could create the needed one of a zillion ioctl call in Scheme yourself without recompiling. A SYSCALL is not a regular C functions - it has about four stages or there were four types of them - but if you have it you should be able to use e.g. inotify without recompiling. On Darwin you would have to recreate the whole thing again - mach messages and kevent from within Scheme. I do generally consider it a good thing to pull things into Scheme and not into C - and I don't know why but in the place of the C library I would like to see some modern System Scheme. Where regular Scheme programs don't even need these strict memory access restrictions or process isolations which have to be circumvented with sewer pipes or sky messages to allow for IPC. ;-) Just pass the reference if you can ...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]