#include <stdio.h>
#include <signal.h>
short fid;

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

{
#define BUFSIZE 8192
	int sfd;
	int i;
	char *malloc();
	char *buffer;

        if((buffer = malloc(BUFSIZE)) == 0) {printf("malloc error\n"); exit(-1);}
	while(--argc) {

	if((sfd = open(*++argv,2)) < 0) {
		printf(" can't open file %s\n",*argv);
		continue;
		}
	for(i=0;i<4000;i++) {
	if(write(sfd,buffer,BUFSIZE) != BUFSIZE) {
		printf("b\n");
		break;
	}
	}
}
}
