Bug ? rpm -qlp exits with status 0 on I/O error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rpm -qlp $file silently exits with status 0 if there's an I/O
error on $file. Is this deliberate ? In my opinion,
{ perror($file); exit (1); } would be a more useful behaviour.

# strace rpm -qlp /mnt2/suse/i586/ami-1.2.3-110.i586.rpm
...
open("/mnt2/suse/i586/ami-1.2.3-110.i586.rpm", O_RDONLY|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
  = 0xb7f86000
poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 1000) = 1
read(3, 0xb7f86000, 8192)               = -1 EIO (Input/output error)
close(3)                                = 0
munmap(0xb7f86000, 8192)                = 0
exit_group(0)                           = ?
Process 15257 detached
# echo $?
0
# rpm --version
RPM version 4.4.1

-- 
André Majorel <URL:http://www.teaser.fr/~amajorel/>
Do not use this account for regular correspondence.
See the URL above for contact information.

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux