chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Wierd behaviour of process.


From: Kon Lovett
Subject: Re: [Chicken-users] Wierd behaviour of process.
Date: Sun, 14 Jan 2007 09:20:15 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Jan 12, 2007, at 11:32 PM, Robin Lee Powell wrote:


In the middle of the Scheme binding I wrote for mooix, I call
process (from posix) for IPC.  The system is, in total, very
complex; so much so that I don't even know where to start to at
making a pared-down example.

So, I'll describe the behaviour.

I run process in the same way (see
http://paste.lisp.org/display/35085 for my code; at least, that's
what it looked like after I had hacked it for a while trying to
solve this problem) quite a number of times.  At one point, process
calls a Perl script that is set sticky (not that I think that
matters, but there you are) that returns no output at all.  process
correctly sees it as returning no output.  The *next* call to
process appends a string, call it StringX, to the real output of the
process it calls, for no apparent reason.

1) What Chicken version?

2) In the code you 'pasted' you are treating the ports returned by process as 2-way but they are only 1-way (they are not pipes). Shouldn't be a major issue but it is wrong.

3) You don't really need to close the input-port before reading. Although closing both will cause the system to "wait" the process.

4) When you say "*next*" call to process do you mean the next use of process w/ any command-path, or the next use of process w/ the aforementioned Perl script?


StringX happens to be the mooix-internal name of the object whose
mooix method was the Perl script I mentioned.  I have no idea where
it's coming from in this interaction; it's not passed through
process at any point that I can see.

The really wierd part:

This only happens if the second argument to process is filled.  I
was filling it with (list "") just to avoid calling the shell
(security warm-fuzzies).  But now I've had to take that out, so this
will work.

This may very well *not* be a Chicken issue: as I said, the system
is very complex and, in particular, hacks a number of libc calls,
including exec*.

However, I've never seen this behaviour before, using either C or
Perl code in mooix, so... *shrug*

Any help/suggestions/things to try welcome, although I do have a
workaround.

-Robin

--
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
Reason #237 To Learn Lojban: "Homonyms: Their Grate!"
Proud Supporter of the Singularity Institute - http://singinst.org/


_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iEUEARECAAYFAkWqZk8ACgkQJJNoeGe+5O7N/gCcCej0Nqn8+HzSi2O62e/kGbfN
gAAAljGXc9/OxzNZguOJ9fe/f3LaYpg=
=wsSM
-----END PGP SIGNATURE-----




reply via email to

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