How to stop sync processes or wait for async processes
- From: Siavash Safi <siavash safi gmail com>
- To: gtkmm-list gnome org
- Subject: How to stop sync processes or wait for async processes
- Date: Sat, 30 Jun 2007 21:54:29 +0330
Hi all :)
I'm working on movic (http://osp.ir/projects/movic), it's a front-end for ffmpeg.
It fork()s a child process and the child process executes ffmpeg using fork()+execvp() and wait()s.
(see converter.cpp if you need more info)
When the user presses Stop, the GUI sends a SIGTERM signal to the child process,
the child process sends a SIGTERM to ffmpeg and abort()s.
I tried to replace the fork()+execvp() with Glib::spawn_sync because it needs less code
and redirects stderr and stdout automatically.But I can't stop ffmpeg now.
The reason is that I can't get ffmpeg's PID to send the SIGTERM signal using kill().
I tried to use Glib::spawn_async which has a PID argument but how should the parent process wait()?
--
Siavash Safi <siavash safi gmail com>
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]