comp.lang.ada
 help / color / mirror / Atom feed
* Semantics of POSIX Ada Binding
@ 2014-07-05 16:33 Natasha Kerensikova
  2014-07-26 10:07 ` Natasha Kerensikova
  0 siblings, 1 reply; 5+ messages in thread
From: Natasha Kerensikova @ 2014-07-05 16:33 UTC (permalink / raw)


Hello,

I have been using Florist implementation of POSIX bindings for a while,
and been mostly happy with it. However the documentation of Florist is a
bit... terse. As far as I can tell, it amounts to "see IEEE STD 1003.5x".

However, while both Ada and POSIX standards are freely available, it
seems that versions of "IEEE STD 1003.5" are not. Or at least I have
failed to find any.

Is there a documentation somewhere that I missed?
Or are we left only with guesswork from public references?


More specifically, my current problem is about the interaction between
Ada tasking and POSIX.Process_Primitives.Start_Process, in light of the
warning about GNAT's System.OS_Lib.Spawn.

Is having Florist enough of an OS restriction to ensure things work
fine? Or is there a subtle difference in the similar implementations of
Start_Process and Spawn that ensure everything is alright?
Or is there some hard-to-find bug just waiting to spring from the
breach?

It would be nice to have some indication on the limits or caveats of
such subprograms...


Funnily, POSIX.Process_Primitives.Start_Process inspired C's
posix_spawn, which is safer and more efficient than fork+exec used in
both System.OS_Lib.Spawn and POSIX.Process_Primitives.Start_Process
implementations (no need to deep copy the full process state in fork()
when you're about to reset it anyway with exec*()).


Thanks in advance for your help,
Natasha


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Semantics of POSIX Ada Binding
  2014-07-05 16:33 Semantics of POSIX Ada Binding Natasha Kerensikova
@ 2014-07-26 10:07 ` Natasha Kerensikova
  2014-07-26 10:37   ` Dmitry A. Kazakov
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Natasha Kerensikova @ 2014-07-26 10:07 UTC (permalink / raw)


Hello,

On 2014-07-05, Natasha Kerensikova <lithiumcat@instinctive.eu> wrote:
> Hello,
>
> I have been using Florist implementation of POSIX bindings for a while,
> and been mostly happy with it. However the documentation of Florist is a
> bit... terse. As far as I can tell, it amounts to "see IEEE STD 1003.5x".
>
> However, while both Ada and POSIX standards are freely available, it
> seems that versions of "IEEE STD 1003.5" are not. Or at least I have
> failed to find any.
>
> Is there a documentation somewhere that I missed?
> Or are we left only with guesswork from public references?
>
>
> More specifically, my current problem is about the interaction between
> Ada tasking and POSIX.Process_Primitives.Start_Process, in light of the
> warning about GNAT's System.OS_Lib.Spawn.
>
> Is having Florist enough of an OS restriction to ensure things work
> fine? Or is there a subtle difference in the similar implementations of
> Start_Process and Spawn that ensure everything is alright?
> Or is there some hard-to-find bug just waiting to spring from the
> breach?
>
> It would be nice to have some indication on the limits or caveats of
> such subprograms...

I'm not found of the idea of "bumping" a thread, but I find it hard to
believe absolutely nobody here has any idea on the topic, or at least on
where I could find pointers towards a solution.

Is it possible the message above has been missed by knowledgeable
people? Or am I really alone on the problem?


Thanks for your help,
Natasha

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Semantics of POSIX Ada Binding
  2014-07-26 10:07 ` Natasha Kerensikova
@ 2014-07-26 10:37   ` Dmitry A. Kazakov
  2014-07-26 14:36   ` Dennis Lee Bieber
  2014-07-27  2:32   ` Randy Brukardt
  2 siblings, 0 replies; 5+ messages in thread
From: Dmitry A. Kazakov @ 2014-07-26 10:37 UTC (permalink / raw)


On Sat, 26 Jul 2014 10:07:37 +0000 (UTC), Natasha Kerensikova wrote:

> On 2014-07-05, Natasha Kerensikova <lithiumcat@instinctive.eu> wrote:
>>
>> I have been using Florist implementation of POSIX bindings for a while,
>> and been mostly happy with it. However the documentation of Florist is a
>> bit... terse. As far as I can tell, it amounts to "see IEEE STD 1003.5x".
>>
>> However, while both Ada and POSIX standards are freely available, it
>> seems that versions of "IEEE STD 1003.5" are not. Or at least I have
>> failed to find any.
>>
>> Is there a documentation somewhere that I missed?
>> Or are we left only with guesswork from public references?
>>
>>
>> More specifically, my current problem is about the interaction between
>> Ada tasking and POSIX.Process_Primitives.Start_Process, in light of the
>> warning about GNAT's System.OS_Lib.Spawn.
>>
>> Is having Florist enough of an OS restriction to ensure things work
>> fine? Or is there a subtle difference in the similar implementations of
>> Start_Process and Spawn that ensure everything is alright?
>> Or is there some hard-to-find bug just waiting to spring from the
>> breach?
>>
>> It would be nice to have some indication on the limits or caveats of
>> such subprograms...
> 
> I'm not found of the idea of "bumping" a thread, but I find it hard to
> believe absolutely nobody here has any idea on the topic, or at least on
> where I could find pointers towards a solution.
> 
> Is it possible the message above has been missed by knowledgeable
> people? Or am I really alone on the problem?

That is probably about what your solution space includes. Mine, for
example, includes "not to use POSIX." I would guess that people feel
hesitant suggesting you to use something else, when you specifically asked
about POSIX...

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Semantics of POSIX Ada Binding
  2014-07-26 10:07 ` Natasha Kerensikova
  2014-07-26 10:37   ` Dmitry A. Kazakov
@ 2014-07-26 14:36   ` Dennis Lee Bieber
  2014-07-27  2:32   ` Randy Brukardt
  2 siblings, 0 replies; 5+ messages in thread
From: Dennis Lee Bieber @ 2014-07-26 14:36 UTC (permalink / raw)


On Sat, 26 Jul 2014 10:07:37 +0000 (UTC), Natasha Kerensikova
<lithiumcat@instinctive.eu> declaimed the following:

>Hello,
>
>On 2014-07-05, Natasha Kerensikova <lithiumcat@instinctive.eu> wrote:
>> However, while both Ada and POSIX standards are freely available, it
>> seems that versions of "IEEE STD 1003.5" are not. Or at least I have
>> failed to find any.
>>

	Well, ignoring that IEEE will want money for any or their standards
(just like ARINC wants for theirs -- last one I looked up was $3 / page!,
for ~125 pages) ...

	A search on the IEEE site says

1003.5c-1998 has been WITHDRAWN (no longer maintained, may have obsolete
and erroneous information). 

IEEE> Description: This standard is part of the POSIX ®series of standards
or applications and user inter-faces to open systems.It defines the Ada
language bindings as package specifications and accompanying textual
descriptions of the application program interface (API).This standard
supports application portability at the source code level through the
binding between ISO 8652:1995 (Ada)and ISO/IEC 9945-1:1996 (IEEE Std
1003.1-1996)(POSIX)as amended by IEEE P1003.1g/D6.6.Terminology and general
requirements,process primitives,the process environment,files and
directories,input and output primaries,device-and class- specific
unctions,language-specific services or Ada,system
databases,synchronization,memory management,execution scheduling,clocks and
timers,message passing,task management,the XTI and socket detailed network
inter-faces,event management,network support functions,and
protocol-specific mappings are covered It also specifies behavior to
support the binding that must be proviced by the Ada.

	I suppose the "...behavior to support the binding..." might cover the
semantics question... or just defer something to the closest OS provided
equivalent.

	I could not find any link in the search to a NEWER 1003.5'x'.
1003.5-1998 (no subpart letter, "Binding for System API") is listed as
SUPERSEDED. But can't find a reference to what replaced it... Looks like
almost all the POSIX stuff is "superseded"

	1003.1-1990 abstract says "see ISO/IEC 9945-1"

	Ah, something active... 1003.1-2008

IEEE> Description: POSIX.1-2008 is simultaneously IEEE Std 1003.1 -2008 and
The Open Group Technical Standard Base Specifications, Issue 7. POSIX.
1-2008 defines a standard operating system interface and environment,
including a command interpreter (or "shell"), and common utility programs
to support applications portability at the source code level. POSIX. 1-2008
is intended to be used by both application developers and system
implementors and comprises four major components (each in an associated
volume): [1]General terms, concepts, and interfaces common to all volumes
of this standard, including utility conventions and C-language header
definitions, are included in the Base Definitions volume. [2] Definitions
for system service functions and subroutines, language-specific system
services for the C programming language, function issues, including
portability, error handling, and error recovery, are included in the System
Interfaces volume. [3] Definitions for a standard source code-level
interface to command interpretation services (a "shell") and common utility
programs for application programs are included in the Shell and Utilities
volume. [4] Extended rationale that did not fit well into the rest of the
document structure, which contains historical information concerning the
contents of POSIX. 1-2008 and why features were included or discarded by
the standard developers, is included in the Rationale (Informative) volume.
The following areas are outside the scope of POSIX. 1-2008: Graphics
interfaces Database management system interfaces Record I/O considerations
Object or binary code portability System configuration and resource
availability. POSIX. 1-2008 describes the external characteristics and
facilities that are of importance to application developers, rather than
the internal construction techniques employed to achieve these
capabilities. Special emphasis is placed on those functions and facilities
that are needed in a wide variety of commercial applications.

	Note that most of those predate Ada-95, much less the 2005/2012
updates.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Semantics of POSIX Ada Binding
  2014-07-26 10:07 ` Natasha Kerensikova
  2014-07-26 10:37   ` Dmitry A. Kazakov
  2014-07-26 14:36   ` Dennis Lee Bieber
@ 2014-07-27  2:32   ` Randy Brukardt
  2 siblings, 0 replies; 5+ messages in thread
From: Randy Brukardt @ 2014-07-27  2:32 UTC (permalink / raw)


"Natasha Kerensikova" <lithiumcat@instinctive.eu> wrote in message 
news:slrnlt6vf8.nrc.lithiumcat@nat.rebma.instinctive.eu...
> Hello,
...
>> I have been using Florist implementation of POSIX bindings for a while,
>> and been mostly happy with it. However the documentation of Florist is a
>> bit... terse. As far as I can tell, it amounts to "see IEEE STD 1003.5x".
>>
>> However, while both Ada and POSIX standards are freely available, it
>> seems that versions of "IEEE STD 1003.5" are not. Or at least I have
>> failed to find any.

Right. So far as I know, there isn't one. Someone once sent me a bootleg PDF 
of the IEEE standard, but it was corrupted. So I've only seen snippets of 
the Standard. (Not surprisingly, Janus/Ada doesn't support a POSIX binding.)

>> Is there a documentation somewhere that I missed?
>> Or are we left only with guesswork from public references?

Guesswork is about it, I fear. Unless you want to buy a copy from IEEE.

...
> I'm not found of the idea of "bumping" a thread, but I find it hard to
> believe absolutely nobody here has any idea on the topic, or at least on
> where I could find pointers towards a solution.

There's no solution that I know of, thus I didn't answer. Dmitry is right --  
don't use POSIX is the best solution. Since Ada.Directories was added to 
Ada, there's a lot less need to use POSIX (particularly if your 
implementation provides a useful Ada.Directories.Information).

> Is it possible the message above has been missed by knowledgeable
> people? Or am I really alone on the problem?

You're not alone, the problem has no solution other than to forget about 
using POSIX bindings.

                                Randy.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-27  2:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-05 16:33 Semantics of POSIX Ada Binding Natasha Kerensikova
2014-07-26 10:07 ` Natasha Kerensikova
2014-07-26 10:37   ` Dmitry A. Kazakov
2014-07-26 14:36   ` Dennis Lee Bieber
2014-07-27  2:32   ` Randy Brukardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox