[Ffmpeg-devel] [PATCH] Remove exit() in vhooks

Víctor Paesa wzrlpy
Sat Mar 31 00:31:48 CEST 2007


Hi,

> On Fri, Mar 30, 2007 at 12:17:09AM +0200, Michael Niedermayer wrote:
>> i
>>
>> On Thu, Mar 29, 2007 at 11:46:07PM +0200, V??ctor Paesa wrote:
>> > Hi,
>> >
>> > The attached patch substitutes in vhooks the now forbidden exit() by
>> return.
>> >
>> > There is a legitimate usage of exit() in ppm.c (it ends life of a
>> spawned
>> > process) that I have substituted by _exit(), I don't know a more
>> elegant way
>> > of doing it.
>>
>> #undef exit ?
>
> For a forked child process, _exit() is the correct way to exit.
> Calling exit() in this case is very bad because it could corrupt any
> stdio files that were not flushed by the parent before forking.

Well, here is just in case a variant using the #undef exit

Regards,
V?ctor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.exit-forbidden.2.diff
Type: application/octet-stream
Size: 5457 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070331/30f7a875/attachment.obj>



More information about the ffmpeg-devel mailing list