fl.l_start = 0;
fl.l_len = 0;
fl.l_pid = getpid();
- fcntl(spu->fd, F_SETLK, &fl);
+
+ // Does the system allows us to place a lock on this file descriptor
+ int err = fcntl(spu->fd, F_SETLK, &fl);
+ if ( err == -1) {
+ //perror("fcntl");
+ }
close(spu->fd);
free(sp);
}