Hi
Has anyone tried porting Gambit to a system without a tty and/or without the low-level file descriptor level? I'm trying to port to an embedded system that's quite similar to USE_WIN32 as far as os_*.[ch] are concerned, however, it has neither a TTY, nor stdin.
I had a try, and got as far as gsi compiling, but I'm getting an exception that I don't understand early on startup.
So, just wondering if anyone has tried this, or has suggestions on plan of attack. Ideally, I'd like to have the system work over a socket connected to the host PC rather than expecting a variety of streams to be available "locally".
thanks, scott
Afficher les réponses par date
On 27-May-05, at 4:35 PM, Scott Graham wrote:
Hi
Has anyone tried porting Gambit to a system without a tty and/or without the low-level file descriptor level? I'm trying to port to an embedded system that's quite similar to USE_WIN32 as far as os_*.[ch] are concerned, however, it has neither a TTY, nor stdin.
I had a try, and got as far as gsi compiling, but I'm getting an exception that I don't understand early on startup.
Can you be more specific... a Scheme exception, a C exception, a signal? Which one?
It is possible to run Gambit with no stdin/stdout/stderr. But you have to avoid referencing them, and if you just start the interpreter in a way that will normally start a REPL, the system will raise a Scheme exception as soon as it tries to display the banner to the user.
So, just wondering if anyone has tried this, or has suggestions on plan of attack. Ideally, I'd like to have the system work over a socket connected to the host PC rather than expecting a variety of streams to be available "locally".
There's an example (in examples/web-repl/web-repl.scm) showing how this can be done.
Marc
Sorry about that, should have been more clear. I was getting a C/OS level exception, because of an invalid pointer. Since you feel it should be doable, I suppose it was probably my poor attempts at some of the os_ functions that were causing the problem.
I tried to do something along the lines of web-repl, but I believe I still need to at least no-op all standard stream stuff because (for example) _thread.scm does an (##open-all-predefined), which as far as I can tell will always get run (or is it only when a thread related function is used?).
Anyway, thanks for your response. I'll have another try and see if I can narrow down the exact cause of the exception I was getting.
scott
On 5/28/05, Marc Feeley feeley@iro.umontreal.ca wrote:
On 27-May-05, at 4:35 PM, Scott Graham wrote:
Hi
Has anyone tried porting Gambit to a system without a tty and/or without the low-level file descriptor level? I'm trying to port to an embedded system that's quite similar to USE_WIN32 as far as os_*.[ch] are concerned, however, it has neither a TTY, nor stdin.
I had a try, and got as far as gsi compiling, but I'm getting an exception that I don't understand early on startup.
Can you be more specific... a Scheme exception, a C exception, a signal? Which one?
It is possible to run Gambit with no stdin/stdout/stderr. But you have to avoid referencing them, and if you just start the interpreter in a way that will normally start a REPL, the system will raise a Scheme exception as soon as it tries to display the banner to the user.
So, just wondering if anyone has tried this, or has suggestions on plan of attack. Ideally, I'd like to have the system work over a socket connected to the host PC rather than expecting a variety of streams to be available "locally".
There's an example (in examples/web-repl/web-repl.scm) showing how this can be done.
Marc