Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » OS Problems etc., Win32, POSIX, MacOS, FreeBSD, X11 etc » [solved] Linux LocalProcess::GetExitCode highly divergent from Windows
[solved] Linux LocalProcess::GetExitCode highly divergent from Windows [message #48734] Sat, 02 September 2017 10:55 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Under Linux, LocalPRocess does not give me the exact exit code the child process gave.

Created this sample app duo:
lpchild package:
#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	SetExitCode(-42);
	Cout() << "Exited with " << GetExitCode() << "!\n";
}



lpparent package:
#include <Core/Core.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	LocalProcess lp("lpchild");
	String t, tt;
	while (lp.Read(t)) {
		if (t.GetCount())
			tt << t;
	}
	Cout() << "Child said:\n";
	Cout() << tt;
	Cout() << "Child exited with: " << lp.GetExitCode() << "\n";
}


output:
Child said:
Exited with -42!
Child exited with: 214


I saw no other API member that could give the real code.

[Updated on: Sat, 02 September 2017 11:26]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: TopWindow has size/maximize issues under Linux
Next Topic: How's the Mac support?
Goto Forum:
  


Current Time: Fri Apr 26 21:02:57 CEST 2024

Total time taken to generate the page: 0.03320 seconds