2 /* SGI module -- random SGI-specific things */
11 sgi_nap(PyObject
*self
, PyObject
*args
)
14 if (!PyArg_ParseTuple(args
, "l:nap", &ticks
))
16 Py_BEGIN_ALLOW_THREADS
23 extern char *_getpty(int *, int, mode_t
, int);
26 sgi__getpty(PyObject
*self
, PyObject
*args
)
33 if (!PyArg_ParseTuple(args
, "iii:_getpty", &oflag
, &mode
, &nofork
))
36 name
= _getpty(&fildes
, oflag
, (mode_t
)mode
, nofork
);
38 PyErr_SetFromErrno(PyExc_IOError
);
41 return Py_BuildValue("(si)", name
, fildes
);
44 static PyMethodDef sgi_methods
[] = {
45 {"nap", sgi_nap
, METH_VARARGS
},
46 {"_getpty", sgi__getpty
, METH_VARARGS
},
47 {NULL
, NULL
} /* sentinel */
54 Py_InitModule("sgi", sgi_methods
);