[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #885: pty egg: example doesn't work
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #885: pty egg: example doesn't work |
Date: |
Wed, 11 Jul 2012 19:44:56 -0000 |
#885: pty egg: example doesn't work
-------------------------+--------------------------------------------------
Reporter: megane | Owner: ashinn
Type: defect | Status: assigned
Priority: minor | Milestone:
Component: extensions | Version: 4.7.x
Resolution: | Keywords: pty
-------------------------+--------------------------------------------------
Changes (by sjamaan):
* owner: => ashinn
* status: new => assigned
* milestone: 4.8.0 =>
Comment:
There seem to be several problems with this egg and the example.
One is that {{{errno}}} seems to be bound to a '''procedure''' (the
"errno" procedure from the library unit) rather than the foreign value
(this could be a bug in the module system?? possibly fixed already??) so
it will never be {{{eq?}}} to {{{_ewouldblock}}}. Also, while
{{{EWOULDBLOCK}}} is identical to {{{EAGAIN}}} on my system, I'm not sure
it's everywhere; might want to add that to the check.
You could re-use {{{errno/wouldblock}}} and {{{errno/again}}} from the
POSIX unit, by the way.
Furthermore, the library doesn't compile on (Net)BSD because there it
needs to include {{{util.h}}} (and also link to libutil, which for some
odd reason OS X doesn't require?).
The example, if used literally, will call ssh with a nonexistant hostname,
so it probably won't really work and it uses some undefined {{{(gui-get-
password)}}} procedure. For now I just added a comment saying that it's
not defined and the user needs to define it. Not sure if this is
something you meant to take out or something?
If I insert a {{{(sleep 10)}}} as first call in the lambda before the
{{{peek-char}}} call, I get an error about this gui procedure, so I guess
somehow the child process hasn't started yet or the PTY hasn't been fully
set up at the time of the peek-char call. That error message is actually
the string that belongs to {{{EAGAIN}}}/{{{EWOULDBLOCK}}}, so I don't
quite see why the loop isn't working.
I'll remove the milestone, since this has nothing to do with the Chicken
release itself.
--
Ticket URL: <http://bugs.call-cc.org/ticket/885#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.