[Jprogramming] How to obtain process status code?
Jorge Arredondo
jorgeantonio.arredondo at gmail.com
Mon Jul 21 11:54:41 HKT 2008
I'm using (2!:0) on Linux to execute a process, if it exits with code
0, I can obtain its output and continue, otherwise an interface error
exception is signaled. Is it possible to execute a process from J on
Linux and get its status code? I tried using (2!:2) but it doesn't
work as it abnormally ends J.
I'm using OpenSuse Linux 10.2 x64 kernel 2.6.18.8-0.9-default (no
mods) and J 6.01
Example:
(2!:0) 'ls -x'
addons breaker.ijs install.txt jbreak jconsole jee
jep jicon.gif j.jar jw libj601.so libjnative.so
libjpcre.so profile.ijs system temp user version_bin.txt
(2!:0) 'ls -'
ls: cannot access -: No such file or directory
|interface error
| (2!:0)'ls -'
(2!:2) 'ls -x'
*** glibc detected *** ./jconsole: double free or corruption (!prev):
0x00000000008daf90 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2b9b98c268fe]
/lib64/libc.so.6(cfree+0x76)[0x2b9b98c27f36]
/lib64/libc.so.6(fclose+0x155)[0x2b9b98c17a65]
...
More information about the Programming
mailing list