pintos/src/utils/squish-pty.c File Reference

#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stropts.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <termios.h>
#include <unistd.h>

Go to the source code of this file.

Defines

#define _GNU_SOURCE   1

Functions

static void fail_io (const char *msg,...) __attribute__((noreturn)) __attribute__((format(printf
static void make_noncanon (int fd, int vmin, int vtime)
static void make_nonblocking (int fd, bool nonblocking)
static bool handle_error (ssize_t retval, int *fd, bool fd_is_pty, const char *call)
static void relay (int pty, int dead_child_fd)
static void sigchld_handler (int signo __attribute__((unused)))
int main (int argc __attribute__((unused)), char *argv[])

Variables

static int dead_child_fd


Define Documentation

#define _GNU_SOURCE   1

Definition at line 1 of file squish-pty.c.


Function Documentation

static void static void fail_io ( const char *  msg,
  ... 
) [static]

Definition at line 29 of file squish-pty.c.

References exit(), EXIT_FAILURE, va_end, and va_start.

Referenced by handle_error(), main(), make_nonblocking(), make_noncanon(), and relay().

static bool handle_error ( ssize_t  retval,
int *  fd,
bool  fd_is_pty,
const char *  call 
) [static]

Definition at line 84 of file squish-pty.c.

References close(), and fail_io().

Referenced by relay().

int main ( int argc   __attribute__(unused),
char *  argv[] 
)

static void make_nonblocking ( int  fd,
bool  nonblocking 
) [static]

Definition at line 65 of file squish-pty.c.

References fail_io().

Referenced by main(), and relay().

static void make_noncanon ( int  fd,
int  vmin,
int  vtime 
) [static]

Definition at line 47 of file squish-pty.c.

References fail_io().

Referenced by relay().

static void relay ( int  pty,
int  dead_child_fd 
) [static]

static void sigchld_handler ( int signo   __attribute__(unused)  )  [static]

Definition at line 249 of file squish-pty.c.

References dead_child_fd, and write().

Referenced by main().


Variable Documentation

int dead_child_fd [static]

Definition at line 246 of file squish-pty.c.

Referenced by main(), and sigchld_handler().


Generated on Mon Jan 10 16:43:58 2011 for Pintos by  doxygen 1.5.6