• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exit Values for a Process

 
Sumanth R Prasad
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to know what exit value represents what?
I know that 0 represents normal termination, but for abnormal stuff ...??
I'm trying to copy a file using Runtime.exec.. and for some reason its failing but I can't seem to know why...coz its not throwing an exception...
I have an if else condition i.e. if exitvalue=0 print(success) else print(failure)... and its always printing failure...
Kindly help me regarding this..
 
Aneesha Singh
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The meaning of these exit values depends on the operating system.. For example, an exitvalue of 2, on Win32 means File Not found. Try printing out the exitvalue before the comparison to see its value.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!