0

I have sample.php file as follows.

<?php
    shell_exec('export DISPLAY=:0.0 && xterm -hold -e "ls -al"');
<?

When i open it (localhost/~user/sample.php) in browser xterm opens and shows the ls -al command output.

but until i close the xterm the browser keep showing the loading thing rotating on the tab in firefox.

I dont want php to wait till i close xterm, instead after opeing the xterm, i want to convery that the page is complete.

I want the page to close after the xterm is opened.

Santhosh
  • 5,564
  • 7
  • 46
  • 107
  • Possible duplicate of [Is there a way to use shell\_exec without waiting for the command to complete?](http://stackoverflow.com/questions/1019867/is-there-a-way-to-use-shell-exec-without-waiting-for-the-command-to-complete) – skrilled May 12 '16 at 17:11
  • in my case i am opening an xterm. unless i close it, the shell_exec is not considered complete. I cant rediect to /dev etc – Santhosh May 12 '16 at 17:15

0 Answers0