Re: launch linux script from windows application

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

 



cmarin wrote:
> Hi,
> 
> Is very strange.
> 
> I'm using Microsoft C++.net 2003 to compile my app.
> 
> Now I have tried this:
> 
> I created a new WIN32 console app  with the wizard with this very simple code:
> 
> Code:
> 
> #include "stdafx.h"
> #include <windows.h> 
> #include <process.h>
> 
> int _tmain(int argc, _TCHAR* argv[])
> {
> 	printf("%s", "\nHola\n");
> 	execl("/bin/sh", "sh", "ls", NULL); 
> 	return 0;
> }
> 
> 
> 


That's wrong. It should be

Code:
	execl("/bin/sh", "-c", "ls", NULL); 








[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux