cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/08/21:45:26

From: Jeff Weeks <info AT codex DOT nu>
Newsgroups: comp.lang.c,comp.os.msdos.djgpp
Subject: Executing a program and obtaining its return value
Date: Wed, 08 Apr 1998 20:45:01 -0400
Organization: Code X Software
Lines: 22
Message-ID: <352C1A0D.77EAB402@codex.nu>
NNTP-Posting-Host: snel.execulink.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi there,

I know how I could go about running a program from inside a C program
(using system or exec*) but neither seem to return the return value of
the program.  Is there an ANSI or POSIX way of obtaining the programs
return value?  If so, how?

Also, do you suppose it's portable to return pointers from executables? 
It seems to me that any system would be able to return a pointer pretty
easily, considering pointers are almost always size_of(int) and int
seems to be returned all the time.  I'm just wondering if there are any
odd problems I should know about.

Jeff
 
--------------------------------------------
            - Code X Software -
       Programming to a Higher Power
  
        email: mailto:info AT codex DOT nu
        web:   http://www.codex.nu/
--------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019