Re: libdpkg: m_fork and friends
On Fri, Mar 16, 2012 at 6:03 PM, lkcl luke <firstname.lastname@example.org> wrote:
> On Fri, Mar 16, 2012 at 5:51 PM, lkcl luke <email@example.com> wrote:
>> apparently it is actually possible to use the low-level
>> NtCreateProcess function to create a unix version of fork. sort-of.
> ye gods what a mess! but... yep, it looks doable. *respect* for mr
> airesoft, for solving _that_ one.
ah i just spoke to him: the code he wrote segfaults when the fork
returns. i started investigating cygwin's implementation instead:
it's much much worse.
um... is there any chance of redesigning dpkg to not require fork?
popen looks like it could be used in movecontrolfiles; likewise in
deb_reassemble, again subproc_fork appears to be being used as a
subsitute for popen. and deb_verify. each of those perform an execlp
immediately after the fork, with a subproc_wait_check...
falliblesubprocess, too, seems to be executing a remote command and
waiting for it to complete before continuing.
ok, i'm labouring the point: is there any situation in dpkg where
fork *isn't* used to do the same job as popen?