read from process ?stderr?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
read from process ?stderr?
Hi, I am looking for a built-in command or function to read from the stderr of another process. I am unable to locate anything in the dictionary or various web-sites. I realize I can redirect stderr to stdout however this would vastly complicate the application.
Thanks in advance for any assistance,
K
Thanks in advance for any assistance,
K
-
- Livecode Opensource Backer
- Posts: 10082
- Joined: Fri Feb 19, 2010 10:17 am
Re: read from process ?stderr?
You can direct your stderr to a text file which can then be read into a LiveCode field or variable.
https://www.computerhope.com/jargon/s/stderr.htm
https://www.computerhope.com/jargon/s/stderr.htm
Re: read from process ?stderr?
Thanks, however redirecting to a file is not acceptable for this implementation as all the standard pipes are streaming. I guess I will look into the FFI I have been reading about. I believe the official product is called LiveCode Builder. It would be interesting to use it for loading dynamic libs (DLLs in windows) ldsym, dlopen etc.? I have used binaryEncode and binaryDecode which is similar to pack and unpack methods I have used in other programming languages. So, the concepts are not foreign to me. If you have any further suggestions they would be appreciated.
Thanks!
K
Thanks!
K
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: read from process ?stderr?
Maybe this?:
https://www.cyberciti.biz/faq/redirecti ... to-stdout/
Code: Select all
command-name 2>&1
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 10082
- Joined: Fri Feb 19, 2010 10:17 am
Re: read from process ?stderr?
Can you do that inwith LiveCode?FourthWorld wrote: ↑Wed May 13, 2020 3:33 amMaybe this?:https://www.cyberciti.biz/faq/redirecti ... to-stdout/Code: Select all
command-name 2>&1
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: read from process ?stderr?
Are you using the shell function to call your CLI process?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 10082
- Joined: Fri Feb 19, 2010 10:17 am
Re: read from process ?stderr?
Um . . .Code: Select all
command-name 2>&1
redirecting to a file is not acceptable
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: read from process ?stderr?
Hmmm... Is that the full error message?
Do you also get that error message in terminal?
It could be the tutorial I linked to is wrong, but it would be good to see the script you used to produce that error.
Do you also get that error message in terminal?
It could be the tutorial I linked to is wrong, but it would be good to see the script you used to produce that error.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn