static PyObject *
posix_getppid(PyObject *self, PyObject *noargs)
{
- return PyInt_FromLong((long)getppid());
+ return PyInt_FromLong(getppid());
}
#endif
static PyObject *
posix_kill(PyObject *self, PyObject *args)
{
- int pid, sig;
+ pid_t pid;
+ int sig;
if (!PyArg_ParseTuple(args, "ii:kill", &pid, &sig))
return NULL;
#if defined(PYOS_OS2) && !defined(PYCC_GCC)
struct file_ref stdio[3];
struct pipe_ref p_fd[3];
FILE *p_s[3];
- int file_count, i, pipe_err, pipe_pid;
+ int file_count, i, pipe_err;
+ pid_t pipe_pid;
char *shell, *sh_name, *opt, *rd_mode, *wr_mode;
PyObject *f, *p_f[3];
{
int result;
int exit_code;
- int pipe_pid;
+ pid_t pipe_pid;
PyObject *procObj, *pidObj, *intObj, *fileObj;
int file_count;
#ifdef WITH_THREAD
#if defined(HAVE_WAIT3) || defined(HAVE_WAIT4)
static PyObject *
-wait_helper(int pid, int status, struct rusage *ru)
+wait_helper(pid_t pid, int status, struct rusage *ru)
{
PyObject *result;
static PyObject *struct_rusage;
static PyObject *
posix_wait3(PyObject *self, PyObject *args)
{
- int pid, options;
+ pid_t pid;
+ int options;
struct rusage ru;
WAIT_TYPE status;
WAIT_STATUS_INT(status) = 0;
static PyObject *
posix_wait4(PyObject *self, PyObject *args)
{
- int pid, options;
+ pid_t pid;
+ int options;
struct rusage ru;
WAIT_TYPE status;
WAIT_STATUS_INT(status) = 0;
static PyObject *
posix_waitpid(PyObject *self, PyObject *args)
{
- int pid, options;
+ pid_t pid;
+ int options;
WAIT_TYPE status;
WAIT_STATUS_INT(status) = 0;
static PyObject *
posix_wait(PyObject *self, PyObject *noargs)
{
- int pid;
+ pid_t pid;
WAIT_TYPE status;
WAIT_STATUS_INT(status) = 0;
static PyObject *
posix_getsid(PyObject *self, PyObject *args)
{
- int pid, sid;
+ pid_t pid;
+ int sid;
if (!PyArg_ParseTuple(args, "i:getsid", &pid))
return NULL;
sid = getsid(pid);
static PyObject *
posix_setpgid(PyObject *self, PyObject *args)
{
- int pid, pgrp;
+ pid_t pid;
+ int pgrp;
if (!PyArg_ParseTuple(args, "ii:setpgid", &pid, &pgrp))
return NULL;
if (setpgid(pid, pgrp) < 0)