Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/runtime/c-libs/posix-io/pipe.c
ViewVC logotype

View of /sml/trunk/src/runtime/c-libs/posix-io/pipe.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (download) (as text) (annotate)
Sun Jan 18 01:01:29 1998 UTC (21 years, 6 months ago) by monnier
File size: 619 byte(s)
This commit was generated by cvs2svn to compensate for changes in r8,
which included commits to RCS files with non-trunk default branches.
/* pipe.c
 *
 * COPYRIGHT (c) 1995 by AT&T Bell Laboratories.
 */

#include "ml-base.h"
#include "ml-values.h"
#include "ml-objects.h"
#include "ml-c.h"
#include "cfun-proto-list.h"
#include <unistd.h>

/* _ml_P_IO_pipe : unit -> int * int
 *
 * Create a pipe and return its input and output descriptors.
 */
ml_val_t _ml_P_IO_pipe (ml_state_t *msp, ml_val_t arg)
{
    int         fds[2];

    if (pipe(fds) == -1)
        return RAISE_SYSERR(msp, -1);
    else {
        ml_val_t        obj;
        REC_ALLOC2 (msp, obj, INT_CtoML(fds[0]), INT_CtoML(fds[1]));
        return obj;
    }

} /* end of _ml_P_IO_pipe */

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0