[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14752: sort fails to fork() + execlp(compress_program) if overcommit

From: Petros Aggelatos
Subject: bug#14752: sort fails to fork() + execlp(compress_program) if overcommit limit is reached
Date: Tue, 02 Jul 2013 02:45:30 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

Following up on this issue it seems that posix_spawn() cannot be used,
at least not trivially. The issue is that posix_spawn decides if it will
spawn the new process with fork() of vfork() based on some conditions,
one of which is if file_actions is NULL.


For the temp compression to work it is nessesary to pass the file
descriptors of the pipe from the parent to the child. I'm not sure how
to proceed, I found this relevant thread that proposes to relax the
restrictions and use vfork more often:


And this thread http://sourceware.org/ml/libc-help/2010-10/msg00001.html
of someone having the same problem and proposing two solutions. Solution
#1 seems to me that adds a lot of complexity. Solution #2 is hacky, and
I'm not aware if there are unwanted sideffects of using the enviroment
to transfer the FDs.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]