Does anyone know what "Interrupted System Call" means?
Below is the source code. It reads/writes XDR through socket.
When buf size>8000, read() error shows "Interrupted System Call".
Got a clue?
Thanks in advance.
--wang
#include <stdio.h>
#include <rpc/rpc.h>
_xdr_write(s, buf, size)
int s; /* socket */
float *buf;
long size;
{
XDR xdrs;
float i,j;
char *addr;
addr=(char *)malloc(sizeof(float)*size);
xdrmem_create(&xdrs, addr,sizeof(float)*size, XDR_ENCODE);
if (! xdr_vector(&xdrs, &buf, size, sizeof(float), xdr_float))
perror("xdr write error");
if (write(s, addr, sizeof(float)*size)!=sizeof(float)*size)
perror("write error");
_xdr_read(s, buf, size)Quote:}
int s; /* socket */
float *buf;
long size;
{
XDR xdrs;
float i,j;
char *addr;
addr=(char *)malloc(sizeof(float)*size);
if (read(s, addr, sizeof(float)*size)!=sizeof(float)*size)
perror("read error");
xdrmem_create(&xdrs, addr,sizeof(float)*size,XDR_DECODE);
if (! xdr_vector(&xdrs, &buf, size, sizeof(float), xdr_float))
perror("xdr read error");
Quote:}