Ver Mensaje Individual
  #14 (permalink)  
Antiguo 26/10/2006, 05:40
Avatar de Eternal Idol
Eternal Idol
 
Fecha de Ingreso: mayo-2004
Ubicación: Lucentum
Mensajes: 6.192
Antigüedad: 20 años, 9 meses
Puntos: 74
Una solucion simple seria esta:

Código:
  fd = open(argv[1], O_RDONLY);
  fstat(fd, &estado);
  ultimo = estado.st_mtime;
  close(fd);
Solo hay que inicializar la variable al comienzo, justo antes del bucle, sino ultimo tiene un valor indefinido.
__________________
¡Peron cumple, Evita dignifica! VIVA PERON CARAJO