|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
A high performance database engine using optimized data access for all development environments including Delphi, Visual Studio .NET, Visual Basic, Visual FoxPro. and more. Learn More |
|
#1
|
|||
|
|||
|
Hi all,
Is it possible to get a negative exit value on a shell script ? my_script.com /usr/bin/my_prog.exe RESULT_EXIT=$? echo $RESULT_EXIT exit My_prog.exe return (-1). The echo gives me 255. why ? Is i a way to get -1 or any other negative value, other than RESULT_EXIT=`expr 254 - $?` thanks. |
|
#2
|
|||
|
|||
|
you have .com and .exe files on unix? a very old version of SCO UNIX when it still belonged to Microsoft?
afaik unix programs return an int, i.e. usually a signed 32 bit value. if your shell only supports unsigned bytes (0-255), i consider this a bug in your shell. as your unix seems to be quite old (10-20yrs?), imho you should really not deal with it at all anymore. although i never tested this behaviour on recent unices..
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > negative exit |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|