Bug 651794 - Incorrect exit code of fuser -m -s
Summary: Incorrect exit code of fuser -m -s
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: psmisc
Version: 14
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Görig
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-10 10:08 UTC by Vlado Potisk
Modified: 2010-11-21 21:54 UTC (History)
2 users (show)

Fixed In Version: psmisc-22.13-5.fc14
Clone Of:
Environment:
Last Closed: 2010-11-21 21:54:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Vlado Potisk 2010-11-10 10:08:34 UTC
Description of problem:
fuser with -m and -s options returns an incorrect exit code. It is always zero.
This breaks scripts.

Version-Release number of selected component (if applicable):
psmisc-22.13-3.fc14.x86_64

How reproducible:
always

Steps to Reproduce:
1. mount a filesystem to e.g. /mnt/disk
2. make sure that the filesystem is not in use
3. run fuser -m /mnt/disk  # exit code is 1
4. run fuser -m -s /mnt/disk  # exit code is 0
  
Actual results:
The exit code in step 4 is wrong.

Expected results:
The -s option should not alter the exit code

Additional info:
Other strange results without the -m option:
fuser /some/mountpoint, e.g. fuser /tmp  # exit code is 1
fuser -s /some/mountpoint  # exit code is 0

Comment 1 Brendan Jones 2010-11-10 13:14:19 UTC
This is reproducible:

localhost:~$ sudo umount /dev/sdc1
localhost:~$ sudo mount /dev/sdc1 /media/extdisk 
localhost:~$ fuser -m /media/extdisk/
localhost:~$ echo $?
1
localhost:~$ fuser -m -s /media/extdisk/
localhost:~$ echo $?
0
localhost:~$ fuser -s -m /media/extdisk/
localhost:~$ echo $?
0





-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Fedora Update System 2010-11-16 15:42:32 UTC
psmisc-22.13-5.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/psmisc-22.13-5.fc14

Comment 3 Fedora Update System 2010-11-16 23:12:59 UTC
psmisc-22.13-5.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update psmisc'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/psmisc-22.13-5.fc14

Comment 4 Fedora Update System 2010-11-21 21:54:49 UTC
psmisc-22.13-5.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.