Io Ho provato con lseek() ma mi da' ESPIPE
ESPIPE fildes is associated with a pipe, socket, or FIFO.
codice:lseek(*sock, pos, 1); switch(errno) { case EBADF: fprintf (stderr, "EBADF fildes is not an open file descriptor."); break; case ESPIPE: fprintf (stderr, "ESPIPE fildes is associated with a pipe, socket, or FIFO."); break; case EINVAL: fprintf (stderr, "EINVAL whence is not one of SEEK_SET, SEEK_CUR,"); fprintf (stderr, "SEEK_END, or the resulting file offset would be negative."); break; case EOVERFLOW: fprintf (stderr, "EOVERFLOW The resulting file offset cannot be represented "); fprintf (stderr, "in an off_t"); break; }

Rispondi quotando