Qt can't kill process -


in qt app run process under push-button click.the process run gnome-terminal.my problem when kill qt process run push-button click button pid,its shows error."kill: sending signal 19771 failed: no such process" still terminal running.and if kill app,but still terminal running.

qprocess *p = new qprocess(this); if (p) {     p->setenvironment( qprocess::systemenvironment() );     p->setprocesschannelmode( qprocess::mergedchannels );     qstring program = "gnome-terminal";     qstringlist arguments;     arguments << "-x" << "bash" << "--rcfile" << "./auto.sh";     p->start(program, arguments);     pid= p->pid(); } 

button2 cod is:

qprocess::startdetached("kill -9 "+qstring(pid)); 

how can kill process , terminal click push-button?


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -