Bug 651794

Summary: Incorrect exit code of fuser -m -s
Product: [Fedora] Fedora Reporter: Vlado Potisk <reg.bugs>
Component: psmiscAssignee: Jan Görig <jgorig>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: brendan.jones.it, jgorig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: psmisc-22.13-5.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-21 21:54:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.