Thanks Mike.  I think you're right about the blocking aspect of this.  I
did try using "open file" instead of get and put URL but got the same
problem.  I was hoping to avoid continually starting and stopping the
process each time I need it but I typically only use it a few times in any
run of the application so probably and this is getting way beyond my Unix
knowledge so I think I'll just start and stop the process each time I need
it.
Pete

On Thu, Jan 12, 2012 at 11:32 AM, Mike Bonner <bonnm...@gmail.com> wrote:

> Just did a small amount of reading on fifo (new stuff for me) looks like
> theres a blocking mode and a non-blocking mode.
> http://linux.die.net/man/7/fifo  has a little bit of info on this, no real
> answer, but I wonder if thats part of the issue. If your process opens them
> in blocking mode, that might be part of the issue.  I wonder if you should
> "open file for read" and "open file for write" to make this work better.
>  IE open them with lc so you have your file handles, then start your shell
> process. (though unless you are backgrounding or disconnecting the shell
> process, I think its blocking which also might be part of the issue, so you
> might use "open process" to start the shell process also. Then, since
> you're redirecting your input and output from the started process you don't
> have to worry about opening the process for read, write, or update since
> you won't be reading or writing directly to it.
>
> As far as that goes, since the fifo files are only acting as pass-throughs,
> can you bipass the whole fifo thing and just "open process for update" and
> then read/write to and from it as necessary?
>
> Hopefully a heavier hitting unix-head will chime in, but maybe something
> here will point you towards an answer.
>
> On Thu, Jan 12, 2012 at 11:44 AM, Pete <p...@mollysrevenge.com> wrote:
>
> > Anyone tried to use FIFO files from within LC? I'd like to use them to
> > communicate with a Unix process from LC but not having any luck
> >
> > I create two fifo files using the Unix mkfifo command. That works fine.
> >  The plan is to start the Unix process with the shell command,
> redirecting
> > it's stdin to one of the fifo files and its stdout to the other fifo
> file,
> > write a command to the stdin file, then read the output from the stdout
> > file.  No matter what order I do things in, LC hangs on either the put
> URL,
> > get URL, or shell command to start the process.
> >
> > I think I'm probably out of luck but maybe someone who knows more about
> > Unix than I can help?
> >
> >
> > --
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to