delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/25/08:15:14

Date: Wed, 25 Sep 1996 06:26:21 -0500 (CDT)
From: Greg Rowinski <mila AT mach3 DOT polbox DOT com DOT pl>
To: djgpp mailing list <djgpp AT delorie DOT com>
Subject: execl problem
Message-ID: <Pine.LNX.3.95.960925062418.560B-100000@mach3.polbox.com.pl>
MIME-Version: 1.0

hallo everybody,
sorry, the previous mail was corrupted, so I resend

The folowing little program shows my problem with execl
(I've found something about execl in mail archive, but it's not clear enough).

m1.c:

#include <stdio.h>
#include <process.h>

int main(int argc, char *argv[])
  {
  printf("hallo world!\n");
  execl("m1.exe","m1.exe",NULL);
  return 0;
  }

This program should never stop (and it does when compiled with Borland TC),
when I compile it with gcc from djgpp v2 :
gcc -o m1 m1.c
and run it :
m1.exe
I get :

hallo world!
hallo world!
hallo world!
hallo world!
hallo world!
hallo world!
hallo world!
Exiting due to signal SIGSEGV
.
.
.

It looks like a bug in execl - is there a patch available or planed?
It there another way to call (gcc compiled) program and make it overlay
the calling program?

thanks in advance

Greg Rowinski
mila data
mila AT mach3 DOT polbox DOT pl

ps
life is an orange

- Raw text -


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