Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Sound in linux (Lack of standards in Linux is a problem but there are some near-standards)
Re: Sound in linux [message #44079 is a reply to message #44071] Tue, 23 December 2014 09:40 Go to previous messageGo to previous message
rainbowsally is currently offline  rainbowsally
Messages: 29
Registered: December 2014
Promising Member
Hi Honza.

Quote:
From the man page of system():
----------
The system() library function uses fork(2) to create a child process
that executes the shell command specified in command using execl(3) as
follows:

execl("/bin/sh", "sh", "-c", command, (char *) 0);

system() returns after the command has been completed.
----------

So to answer your question, yes it blocks. But you can always call fork() and one of the exec* functions (there is about six of them). That in itself is not blocking, later you can check if the process is completed by calling waitpid(pid_returned_from_fork, &return_code, NOHANG), which is also nonblocking operation.

Honza


True. Smile

Now here's a trickier one. How might we launch an app in another thread, that we KNOW will take a long time, and shut it down with calls to STOP and CONTINUE from time to time, in order to assure that the GUI continues to be responsive during a system() call.

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Raster::Line segfaults ... sometimes.
Next Topic: Adding network proxy support to U++
Goto Forum:
  


Current Time: Sat May 11 17:07:47 CEST 2024

Total time taken to generate the page: 0.03502 seconds