LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2011, 04:14 PM   #1
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Rep: Reputation: 40
php, immediate return from system call?


Hi group,

Is there a way to return from a system call before the call completes?
Here is a simple script:
Code:
#!/usr/bin/php
<?php
function Plot($Data) {
  system( "display -immutable $Data &" );
  echo "System call done\n";
  return;
}
Plot("/usr/share/icons/crystalsvg/128x128/mimetypes/source_php.png");
echo "Done\n";
?>
The call to display does not return until the window is closed.
 
Old 11-29-2011, 04:28 PM   #2
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA, Earth
Distribution: Debian/ Fedora/ Ubuntu/ Raspbian
Posts: 549

Original Poster
Rep: Reputation: 40
changed call from 'system' to 'popen'.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
close() system call does not return error? archieval Programming 1 08-31-2008 04:44 PM
does a system call return value?? docetes Programming 2 03-16-2006 05:40 PM
Retain Server Connection Up, If Client Break, write system call return SIGPIPE anandss2004 Programming 2 10-24-2005 12:16 AM
Is it possible to use system() and get the return value from the system call newguy21 Programming 1 08-11-2004 01:37 PM
How can get values return from a system call quenn Programming 1 09-16-2003 11:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration