Windows Spawnl (nowait) like function in Linux... How to use Execl function?
Hi All,
Hope you all are doing great there.
I am familiar with spawn function in Windows, where i will initiate another process and stop there itself?
Windows Code:
error = spawnl(P_WAIT,"C:\\showjpg.exe",
"C:\\showjpg.exe","D:\\6\\2.jpg","-q","-c","-e","-k",NULL );
Similarly i am trying in linux.After googled i found feh image viewer would be good to display image from command line.So i included in my C Program.
Here is the line,
execl("/usr/bin/feh", "/usr/bin/feh","-F","-Z","-x","-dD","-d","-q","/root/Desktop/Study/Vision\ chart/New\ folder/images/01.jpg",NULL);
The problem i am facing here is its getting stopped as the old process was replaced by the new exiting process.My wish was after executing the old process(i.e. after displaying the new image it should return back to the C program itself) so that further i need to display image on getting suitable input from the user.
Can anyone help me to solve this ?? This process should get exited once its executed.I m stucked here.
Many Thanks!!!
Cheran
I m still a learner - As Always
|