Re: [Anjuta-list] using execl().. how?



hi

I think that you don't use execl the right way.
As I remember, in execl, the first argument of the argument list is the name of executable and the list ends with NULL.
In your case, this should be

execl("/Project/form1", "/Project/form1", NULL);

I hope this helps

Fabrice

Luthfi wrote:

Hi all, i am new using anjuta.
i want to make an interface to execute several executable binary file
when click a button, i use this code in callback.c:
{
  char *arg;
  *arg=0;
  fork();
  execl("/Project/form1",arg);
}

when i run the program, after click the button, form1 is executed, but
opened twice. form1 doesn't have any argument.
if i del fork(), after clicking the button, an error message appear
and form1 could not be opened.
I need help. i want it only opened once after clicking the button.
Thanks.

Luthfi


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Anjuta-list mailing list
Anjuta-list lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/anjuta-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]