From: Victor Porton <porton@narod.ru>
Subject: Re: Execute an OS command and capture output
Date: Mon, 13 Nov 2017 23:09:09 +0200
Date: 2017-11-13T23:09:09+02:00 [thread overview]
Message-ID: <oud1lj$vu8$1@gioia.aioe.org> (raw)
In-Reply-To: oucvlf$qbe$1@gioia.aioe.org
Dmitry A. Kazakov wrote:
> On 2017-11-13 21:16, Victor Porton wrote:
>> Dmitry A. Kazakov wrote:
>>
>>> GTK is not Web-based. It is written in C.
>>
>> I meant that my software (not GTK) is Web based.
>
> Well, Web-based as browser side or web-based as server side. On the
> server side you can do anything on the browser side basically nothing.
I mean server-based.
If it were browser-based, I would write to a JavaScript group instead of Ada
group.
>>>> Is it possible to extract this code and use it separately?
>>>
>>> Sources of GLib are freely available.
>>>
>>> But it would be too complicated, especially under Windows were the GLib
>>> implementation uses a helper process.
>>
>> It seems we need a helper process on Linux/Unix too:
>>
>> From https://codelabs.ch/spawn-manager/index.html
>>
>> The Ada spawn manager implements the concept described in the GNAT GPL
>> package System.OS_Lib. It is used to solve the problem of spawning
>> processes at arbitrary times from multitasking Ada programs:
>
> I have no idea why spawning a process should be a problem from a task.
>
>> In your opinion, is it really necessary?
>
> No idea. It is not necessary under with Win32 API. As for Linux I don't
> know if Posix calls must be done from a dedicated task. I somewhat doubt
> that.
I suspect, you doubt in vain. It is got from a very reputable source
(SYSTEM.OS_LIB specification from GNAT COMPILER COMPONENTS):
[[
If the parent is using tasking, and needs to spawn subprocesses at
arbitrary
times, one technique is for the parent to spawn (very early) a particular
spawn-manager subprocess whose job is to spawn other processes. The spawn-
manager avoids tasking. The parent sends messages to the spawn-manager
requesting it to spawn processes, using whatever inter-process
communication
mechanism you like, such as sockets.
]]
--
Victor Porton - http://portonvictor.org
next prev parent reply other threads:[~2017-11-13 21:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-13 16:38 Execute an OS command and capture output Victor Porton
2017-11-13 16:41 ` Victor Porton
2017-11-13 17:41 ` Dmitry A. Kazakov
2017-11-13 18:52 ` Victor Porton
2017-11-13 20:06 ` Dmitry A. Kazakov
2017-11-13 20:16 ` Victor Porton
2017-11-13 20:34 ` Dmitry A. Kazakov
2017-11-13 21:09 ` Victor Porton [this message]
2017-11-14 9:36 ` Dmitry A. Kazakov
2017-11-13 19:07 ` Victor Porton
2017-11-13 19:22 ` Victor Porton
2017-11-13 20:17 ` Dmitry A. Kazakov
2017-11-14 10:57 ` A. Cervetti
2017-11-13 21:32 ` briot.emmanuel
2017-11-16 1:00 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox