On Wednesday, December 28, 2011, Måns Rullgård <[email protected]> wrote:
> Sean McGovern <[email protected]> writes:
>
>> On Wednesday, December 28, 2011, Måns Rullgård <[email protected]> wrote:
>>> Sean McGovern <[email protected]> writes:
>>>
>>>> On Tue, Dec 27, 2011 at 7:19 PM, Sean McGovern <[email protected]>
>> wrote:
>>>>> 2011/10/21 Måns Rullgård <[email protected]>:
>>>>>> "Sean McGovern" <[email protected]> writes:
>>>>>>
>>>>
>>>> [snip..]
>>>>
>>>>>> the same thing.  Since they probably won't, installing a simple
wrapper
>>>>>> as /bin/sh will work as well.  Something like this should do it:
>>>>>>
>>>>>> #include <stdlib.h>
>>>>>> #include <unistd.h>
>>>>>>
>>>>>> int main(int argc, char **argv)
>>>>>> {
>>>>>>    if (getenv("_XPG"))
>>>>>>        execv("/usr/xpg4/bin/sh", argv);
>>>>>>    else
>>>>>>        execv("/bin/sh.real", argv);
>>>>>>    return 127;
>>>>>> }
>>>>>
>>>>> Finally got around to trying this (thanks Mans!) -- apparently
>>>>> /usr/xpg4/bin/sh doesn't like configure, as it crashes the shell it's
>>>>> running in. Can I make configure verbose enough to tell me which line
>>>>> (or approximate line) it's crapping out on?
>>>>>
>>>>> Switching the execv() to call /usr/bin/bash instead works, but I'm
>>>>> curious as to what isn't working in the xpg4 shell.
>>>>
>>>> Found it! The SIGTERM generated by check_exec_crash() seems to bubble
>>>> up to the shell and kill it. I guess it's not actually running in a
>>>> subshell like the comments above it suggest?
>>>
>>> That reminds me, I'd like to get rid of that test.  Does anyone remember
>>> why a pure compile-test was deemed insufficient here?
>>
>> Coud 'trap' be used in the meantime to mitigate it, or would that break
the
>> test? Is 'trap' considered a POSIX extension?
>
> To devise a workaround I first need to understand what is broken.

The check_exec_crash function is supposed to run the test in a subshell so
that the SIGTERM that it raises does not cause 'configure' itself to
terminate, only the subshell it was executing inside. I'm not certain how
to test /usr/xpg4/bin/sh to see if it is actually properly spawning a
subshell though. Perhaps with truss(1) somehow?

As this seems to be the only POSIX shell it fails on (that we are aware of
anyways), maybe this isn't worth pursuing any further? I've already set the
/bin/sh wrapper to spawn /bin/bash instead.

--Sean McG.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to