strange thing for execlp() function

kaiduan xie kaiduanx@yahoo.ca
Sun Jan 25 04:46:00 GMT 2004


Hi,all,
I just want to use execlp to invoke another program
from a program. It works on Linux, but it stucks on
Cygwin. Acutally, this is a very very very simple
program:
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
int main()
{
	pid_t pid;
	
	printf("Hello, cygwin!\n");
	if (execlp("/home/kaiduan/test2.exe",
"test2.exe",(char *)0) < 0)
		printf("Error is %s\n", strerror(errno));
}
I also added current directy to PATH, but it still
sucks. Anything wrong?
Thanks
kaiduan
______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /