Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: michel@lami.univ-evry.fr, caml-list@inria.fr
Subject: Re: ocaml et Unix
Date: Mon, 18 May 1998 15:10:43 +0200	[thread overview]
Message-ID: <19980518151043.00155@pauillac.inria.fr> (raw)
In-Reply-To: <199805141214.OAA09058@piaf.lami.univ-evry.fr>; from michel@lami.univ-evry.fr on Thu, May 14, 1998 at 02:14:23PM +0200

Bonjour,

> un certain nombre d'appels systemes Unix ne sont pas
> fournis via le module Unix sous ocaml1.07. Est-ce un choix
> delibere ou seulement un manque de temps ?

De manière générale, nous enrichissons l'interface Unix suivant les
besoins qui se manifestent.

> Je pense par exemple a :
> 
> 	fnctl

fnctl est un fourre-tout qui recouvre plusieurs fonctionnalités
différentes.  En raison du typage strict de Caml, il faudrait remonter
plusieurs fonctions, une par fonctionnalité.  Pour F_DUPFD, nous avons
déja Unix.dup.   F_GETLK, F_SETLK, F_SETLKW sont accessibles via
Unix.lockf.  Il manque en effet F_GETFD, F_SETFD, F_GETFL, F_SETFL.

>       ioctl,

Comme fcntl, mais pire: le type du 3ième argument dépend de la valeur
du premier!  C'est donc impossible à typer en Caml.  (En C aussi d'ailleurs.)
D'autre part, ioctl est inutilisable quand on ne peut accéder aux
constantes définies dans les includes du système, ce qui est le cas en
Caml.  Mieux vaut écrire en C une fonction qui fait l'appel ioctl dont
vous avez besoin, et remonter cette fonction C en Caml.

> 	pour signal(), le signal SIGIO (qui est bien POSIX).

D'après mes specs, SIGIO n'est pas dans POSIX.1-1990, ni même dans
Unix 98.

Cordialement,

- Xavier Leroy





      reply	other threads:[~1998-05-18 13:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-14 12:14 michel
1998-05-18 13:10 ` Xavier Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980518151043.00155@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=michel@lami.univ-evry.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox