test7.c File Reference

#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>

Include dependency graph for test7.c:

Go to the source code of this file.

Defines

#define ITERATIONS   4
#define MAX_ERROR   4
#define ITEMS   32
#define READ   10
#define WRITE   20
#define UNLOCK   30
#define U   70
#define L   80

Functions

 _PROTOTYPE (int main,(int argc, char *argv[]))
 _PROTOTYPE (void test7a,(void))
 _PROTOTYPE (int set,(int how, int first, int last))
 _PROTOTYPE (int locked,(int b))
 _PROTOTYPE (void e,(int n))
 _PROTOTYPE (void sigfunc,(int s))
int main (int argc, argv)
void test7a ()
void test7b ()
void test7c ()
void test7d ()
void test7e ()
void test7f ()
void test7g ()
void test7h ()
void test7i ()
void test7j ()
void cloexec_test ()
int set (int how, int first, int last)
int locked (int b)
void e (int n)
void sigfunc (int s)
void quit ()

Variables

char buf [ITEMS] = {0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8,9}
int subtest
int errct
int xfd
int whence = SEEK_SET
int func_code = F_SETLK
char ** environ


Define Documentation

#define ITEMS   32
 

Definition at line 21 of file test7.c.

Referenced by test7a(), test7b(), test7d(), test7e(), test7f(), test7g(), test7h(), test7i(), and test7j().

#define ITERATIONS   4
 

Definition at line 19 of file test7.c.

#define L   80
 

Definition at line 26 of file test7.c.

#define MAX_ERROR   4
 

Definition at line 20 of file test7.c.

#define READ   10
 

Definition at line 22 of file test7.c.

#define U   70
 

Definition at line 25 of file test7.c.

Referenced by inflate_fast(), inflateBackInit_(), inflateCopy(), inflateReset(), locked(), skip(), test7d(), and updatewindow().

#define UNLOCK   30
 

Definition at line 24 of file test7.c.

#define WRITE   20
 

Definition at line 23 of file test7.c.


Function Documentation

_PROTOTYPE void  sigfunc,
(int s
 

_PROTOTYPE void  e,
(int n
 

_PROTOTYPE int  locked,
(int b
 

_PROTOTYPE int  set,
(int how, int first, int last) 
 

_PROTOTYPE void  test7a,
(void) 
 

_PROTOTYPE int  main,
(int argc, char *argv[]) 
 

void cloexec_test  ) 
 

Definition at line 598 of file test7.c.

References close, e, exit(), fflush(), and stdout.

Referenced by main().

void e int  n  ) 
 

Definition at line 660 of file test7.c.

References chdir, errct, errno, exit(), fflush(), MAX_ERROR, perror(), printf, stdout, subtest, and system().

int locked int  b  ) 
 

Definition at line 633 of file test7.c.

References e, exit(), F_GETLK, F_UNLCK, F_WRLCK, fcntl, flock(), fork, L, long(), pid, status, U, wait, WEXITSTATUS, whence, WIFEXITED, and xfd.

int main int  argc,
argv 
 

Definition at line 52 of file test7.c.

References atoi, chdir, cloexec_test(), fflush(), i, ITERATIONS, m, printf, stdout, sync, system(), test7a(), test7b(), test7c(), test7d(), test7e(), test7f(), test7g(), test7h(), test7i(), and test7j().

void quit  ) 
 

Definition at line 682 of file test7.c.

References chdir, errct, exit(), printf, and system().

int set int  how,
int  first,
int  last
 

Definition at line 614 of file test7.c.

References F_RDLCK, F_UNLCK, F_WRLCK, fcntl, flock(), func_code, long(), r, READ, UNLOCK, whence, WRITE, and xfd.

void sigfunc int  s  ) 
 

Definition at line 677 of file test7.c.

void test7a  ) 
 

Definition at line 85 of file test7.c.

References buf2, close, e, errno, i, ITEMS, pipe, read, subtest, and write.

Referenced by main().

void test7b  ) 
 

Definition at line 115 of file test7.c.

References buf2, close, e, ENOENT, ENOTDIR, ENXIO, errno, exit(), fork, ITEMS, mkfifo, O_NONBLOCK, O_RDONLY, O_WRONLY, open, printf, read, status, strcmp, strerror(), subtest, unlink, wait, and write.

Referenced by main().

void test7c  ) 
 

Definition at line 183 of file test7.c.

References close, creat, e, environ, errno, execle, exit(), F_DUPFD, F_GETFD, F_GETFL, F_SETFD, F_SETFL, fcntl, FD_CLOEXEC, fork, fstat, m, O_APPEND, O_NONBLOCK, O_WRONLY, s, stat::st_dev, stat::st_ino, stat2, subtest, wait, and WEXITSTATUS.

Referenced by main().

void test7d  ) 
 

Definition at line 268 of file test7.c.

References close, creat, e, ITEMS, L, locked(), O_RDWR, open, READ, set(), subtest, U, UNLOCK, WRITE, write, and xfd.

Referenced by main().

void test7e  ) 
 

Definition at line 336 of file test7.c.

References access, close, creat, e, errno, exit(), F_SETLKW, fork, func_code, ITEMS, kill, O_RDWR, open, pid, s, set(), SIGKILL, sleep, subtest, unlink, wait, WRITE, write, and xfd.

Referenced by main().

void test7f  ) 
 

Definition at line 369 of file test7.c.

References access, close, creat, e, EINTR, errno, exit(), F_SETLKW, fork, func_code, ITEMS, kill, O_RDWR, open, pid, s, set(), sigaction, sigemptyset, SIGTERM, sleep, subtest, unlink, wait, WRITE, write, and xfd.

Referenced by main().

void test7g  ) 
 

Definition at line 413 of file test7.c.

References access, close, creat, e, exit(), F_SETLKW, fork, func_code, ITEMS, O_RDWR, open, pid, s, set(), sleep, subtest, unlink, UNLOCK, wait, WRITE, write, and xfd.

Referenced by main().

void test7h  ) 
 

Definition at line 446 of file test7.c.

References access, close, creat, e, exit(), F_SETLKW, fork, func_code, ITEMS, O_RDWR, open, pid, pid2, s, set(), sleep, subtest, unlink, UNLOCK, wait, WRITE, write, and xfd.

Referenced by main().

void test7i  ) 
 

Definition at line 495 of file test7.c.

References close, creat, e, EBADF, EINVAL, ENOLCK, errno, F_DUPFD, fcntl, i, ITEMS, O_RDONLY, O_RDWR, O_WRONLY, open, READ, set(), subtest, WRITE, write, and xfd.

Referenced by main().

void test7j  ) 
 

Definition at line 565 of file test7.c.

References close, creat, e, EACCES, EAGAIN, errno, exit(), fork, ITEMS, O_RDWR, open, READ, s, set(), subtest, UNLOCK, wait, WRITE, write, and xfd.

Referenced by main().


Variable Documentation

char buf[ITEMS] = {0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8,9}
 

Definition at line 28 of file test7.c.

char** environ
 

Definition at line 19 of file environ.c.

int errct
 

Definition at line 30 of file test7.c.

int func_code = F_SETLK
 

Definition at line 31 of file test7.c.

Referenced by set(), test7e(), test7f(), test7g(), and test7h().

int subtest
 

Definition at line 30 of file test7.c.

int whence = SEEK_SET
 

Definition at line 31 of file test7.c.

int xfd
 

Definition at line 30 of file test7.c.

Referenced by eshand(), isKanji(), locked(), mahand(), mjhand(), mmhand(), pohand(), set(), srhand(), test7d(), test7e(), test7f(), test7g(), test7h(), test7i(), and test7j().


Generated on Fri Apr 14 23:22:28 2006 for minix by  doxygen 1.4.6