JNI calling "system" function crashes

Isselmou Ould-Dellahy iod@ccrl.mot.com
Mon May 17 16:27:00 GMT 1999


I've minimized the problem leading to a crash when the function
"int system(const char *)" is called from a JNI method.
In such a case it gives the message :
****** /home/noer/src/b20/comp-tools/devo/winsup/exceptions.cc:348 __get_signal_mutex failed, res -1, error 6
before it crashes.
If you would like to take a closer look, I attached here the jni_sys.tar.gz
minimum program that shows it, but I'm quite confident the problem is known.
The way it crashes is like when you mix two runtimes. But I verified that
when we compile within cygwin runtime, the "system()" prototype is :
int system (const char *__string) ;
wich is in the file :
/cygnus/cygwin-b20/H-i586-cygwin32/lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../i586-cygwin32/
include/stdlib.
and the implemetation we link with is in :
/Cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/lib/libcygwin.a
Mumit Khan wrote :
> Can you try with the Mingw runtime and see if the problem persists?

I tried the minimum program with mingw and it works fine; but when I try to
use mingw for a more serious program the linker lacks some symbols like :
_impure_ptr
sbrk
sysconf
gettimeofday
times
getuid
getpwuid
uname
getdomainname
did anyone encounter this problem ? I appreciate your help.
Regards
-- 
Isselmou OULD DELLAHY


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /