Re: Weird failure with latches in curculio on v15

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Weird failure with latches in curculio on v15
Дата
Msg-id 1384520.1675272439@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Weird failure with latches in curculio on v15  (Andres Freund <andres@anarazel.de>)
Ответы Re: Weird failure with latches in curculio on v15  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2023-02-01 12:08:24 -0500, Robert Haas wrote:
>> I like the idea of not relying on system(). In most respects, doing
>> fork() + exec() ourselves seems superior. We can control where the
>> output goes, what we do while waiting, etc. But system() runs the
>> command through the shell, so that for example you don't have to
>> invent your own way of splitting a string into words to be passed to
>> exec[whatever](). I've never understood how you're supposed to get
>> that behavior other than by calling system().

> We could just exec the shell in the forked process, using -c to invoke
> the command. That should give us pretty much the same efficiency as
> system(), with a lot more control.

The main thing that system() brings to the table is platform-specific
knowledge of where the shell is.  I'm not very sure that we want to
wire in "/bin/sh".

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: MacOS: xsltproc fails with "warning: failed to load external entity"
Следующее
От: Robert Haas
Дата:
Сообщение: Re: pg_dump versus hash partitioning