Process.Exitcode is always less than 255

sumesh0710

New member
Joined
Dec 12, 2007
Messages
2
Programming Experience
1-3
Hello
I have a dotnet program which is compiled in .net 2003 in windows. I run this program in linux. It calls a c program in process.start() method from .net. Upon some error conditions the c program returns the error code to .net program. The problem is here. Suppose i return an error code 2053, and when i read this code from process.exitcode in .net, what i get is 5. on experiment i found that, what ever i return from c program, .net resets it after 255. In above case its like 256*8=2048.
2048+5=2053. and i get 5 in .net. In windows it works correctly.How to solve this problem?any idea?

I am using mono 1.2.4 in linux
 
Back
Top