[mythtv] Closing FDs before exec

Christopher Pascoe c.pascoe at itee.uq.edu.au
Thu Oct 21 04:44:46 UTC 2004


>> Either of these alternatives seems to address my problems with the
>> dvb demux devices being held open for too long, causing back-to-back
>> recordings to fail whilst transcoding is taking place.
>
> You mean that to be _exit() in the child?  Probably be easier to just
> reuse the existing fork/exec code from, say, the external channel
> change bits..

I seem to be quite good at not copying updated diffs from the machines I
work on to the machine that I send mail from.

I hadn't spotted the ChangeExternalChannel/SpawnApp versions, but I was
using execl and _exit in my other versions to avoid yet another fork.
I've reattached an (as yet untested, I'm recording) replacement that
uses sysconf (like the others do) and replaces LircClient::SpawnApp's
code with a call to myth_system.  The particular return values in the
myth_system call are to try to make this mimic system(3)'s behaviour.

It's probably possible to consolidate the ChangeExternalChannel code
too, and there's another myth_system in libmythui/util.cpp that could
benefit from similar changes.

Regards,
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myth_system.diff2
Type: application/octet-stream
Size: 3026 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041021/87706201/myth_system-0001.obj


More information about the mythtv-dev mailing list