/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1999-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#include "sftest.h"
typedef struct _mydisc_s
{
} Mydisc_t;
#if __STD_C
#else
Sfio_t* f;
void* buf;
size_t n;
#endif
{
int r;
return 0;
return 0;
}
terror("Bad reading of data from file r=%d n=%d", r, n);
terror("Sending read size");
return r;
}
#if __STD_C
#else
int send;
int recv;
Sfio_t* f;
#endif
{
{ for(i = 0; i < 10; ++i)
*bp++ = '\0';
}
for(i = 0; i < ITER; i++)
{
/* write out a buffer of data */
terror("Bad write to file");
/* now wait until readprocess exhausts the data */
while(size > 0)
if(s <= 0 || s > size)
terror("Reader just told a bad read size %d", s);
size -= s;
}
}
size = 0;
terror("Sending eof signal");
}
tmain()
{
int i, s, rv;
terror("Making pipes for communications");
terror("Creating temp file");
terror("Opening temp file to read");
switch(fork())
{
case -1 :
terror("fork() failed");
case 0 :
break;
default:
break;
s += rv;
terror("Bad data");
}
break;
}
texit(0);
}