Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphics et Unix #8003

Closed
vicuna opened this issue Jan 31, 2003 · 1 comment
Closed

Graphics et Unix #8003

vicuna opened this issue Jan 31, 2003 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Jan 31, 2003

Original bug ID: 1531
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Bonjour,

une petit remarque:

Le programme qui teste l'IO asynchrone (async_io.c dans
config/auto-aux) échoue sur les systèmes linux pour un truc bête : le
test est effectué sur des pipes alors que linux n'implémente l'IO
async que sur les sockets et les ttys. Or la communication X11 passe
par des sockets, donc tout marche parfaitement pour le module Graphics
avec IO asynchrone (je crois que ce n'est utilisé que là).

Je suggère donc de modifier le fichier async_io.c en remplaçant le
pipe() par un socketpair().

--
Olivier


--- config/auto-aux/async_io.c.bak Fri Jan 31 16:53:56 2003
+++ config/auto-aux/async_io.c Fri Jan 31 17:04:48 2003
@@ -13,10 +13,14 @@

/* $Id: async_io.c,v 1.7 2001/12/07 13:39:43 xleroy Exp $ */

+#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <errno.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
#include "s.h"

int signalled;
@@ -33,7 +37,7 @@
int ret;
#define OUT 0
#define IN 1

  • if (pipe(p) == -1) return 1;
  • socketpair(PF_LOCAL, SOCK_DGRAM, 0, p);
    signalled = 0;
    signal(SIGIO, sigio_handler);
    ret = fcntl(p[OUT], F_GETFL, 0);
    @@ -44,7 +48,7 @@
    return 1;
    case 0:
    close(p[OUT]);
  • write(p[IN], "x", 1);
  • send(p[IN], "x", 1, 0);
    sleep(1);
    exit(0);
    default:


@vicuna
Copy link
Author

vicuna commented Feb 11, 2003

Comment author: administrator

Fixed 2003-02-11 by XL.

@vicuna vicuna closed this as completed Feb 11, 2003
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant