Problem of "hanging" ended programs solved!!

Linux specific forum
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Problem of "hanging" ended programs solved!!

Post by Didelphodon »

Know the problem if you start a program out of your's with RunProgram and it doesn't disappear from the processlist though it has already ended?? :shock:

Here's the reason why and the solution:
The called program wants to return a ReturnCode to the caller, even if you didn't use End RC to finish it (!!), and this ReturnCode HAS TO BE read. So just use the command ProgramExitCode(program) to read it and the called program/process is happy with that and will go away for sure. :P

Greetz, Didelphodon.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Cool, good find
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Doesn't CloseProgram() work?
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Post by Didelphodon »

Trond wrote:Doesn't CloseProgram() work?
No - at least not in my situation(s). :wink:
Post Reply