bug-ncurses
[Top][All Lists]
Advanced

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

Regarding terminating a program


From: shailendra singh
Subject: Regarding terminating a program
Date: Tue, 6 Nov 2012 07:58:00 -0500

Hello everybody.
                         I am done with my program,but in last i want to terminate my program and using fork() and execlp() to execute a command ls or pwd or hostname or telnet.pwd and ls are working but after that terminal get hanged.I want the GUI to end after the command is executed and TELNET and localhost are not working .
need help. here is a part of my code.

 else if(selected_item==0){
                wprintw(messagebar,"You have selected menu SHAILENDRA SINGH.",1);
write_data0();
if(fork())
wait(0);
else
execlp("clear","clear",(char *)NULL);
execlp("ls","ls",(char *)NULL);
}


need help.

--
With regards.
Shailendra Singh
Team "SURYAAN"

Here's to the crazy ones, the misfits, the rebels, the troublemakers,the
round pegs in the square holes... the ones who see things differently --
they're not fond of rules... You can quote them, disagree with them, glorify
or vilify them, but the only thing you can't do is ignore them because they
change things... they push the human race forward, and while some may see
them as the crazy ones, we see genius, because the ones who are crazy enough
to think that they can change the world, are the ones who do.
-- Steve Jobs, US computer engineer & industrialist (1955 - )*



reply via email to

[Prev in Thread] Current Thread [Next in Thread]