The following code works just fine:

        loadlib P1, "/lib/libc.so.6"
        dlfunc P0, P1, "system", "it"
        set I0, 1
        set S5, "ls"
        invoke
        end

(Which in itself tickles and scares the bejesus out of me.) Is there a good way of finding the standard C library on a Unix system other than hard-wiring it in like this?

Also, is there any way yet of getting an unbuffered read (in parrot) so I can getc() from the keyboard? I should ask, is there an *approved* way of doing that now? I'm fairly familiar with C's I/O model so I could pull it off with ioctl(), fcntl(), etc... and all of their friends, but alas they're not around yet.

These questions are not necessarily related. Or unrelated. :)




Reply via email to