Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 588322 - fuser'ing a non-existent file yields two error messages
fuser'ing a non-existent file yields two error messages
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: psmisc (Show other bugs)
11
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Novotny
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-03 09:34 EDT by Tim Landscheidt
Modified: 2010-05-18 08:21 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-18 08:21:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (683 bytes, patch)
2010-05-05 07:46 EDT, Daniel Novotny
no flags Details | Diff

  None (edit)
Description Tim Landscheidt 2010-05-03 09:34:40 EDT
Description of problem:

When "fuser $NOTEXIST", fuser prints out two identical messages saying that it couldn't stat the file. This is at least confusing and should either be condensed to one message or the messages should be expanded (see below).


Version-Release number of selected component (if applicable):

psmisc-22.6-9.fc11.i586


How reproducible:

Always.


Steps to Reproduce:

1. "fuser doesnotex.ist"

  
Actual results:

| [tim@passepartout ~]$ fuser doesnotex.ist
| Cannot stat doesnotex.ist: Datei oder Verzeichnis nicht gefunden
| Cannot stat doesnotex.ist: Datei oder Verzeichnis nicht gefunden
| [tim@passepartout ~]$


Expected results:

Either one message or a more detailed explanation (see below).


Additional info:

The first line stems from fuser.c:333 (parse_*file* ()), the second from fuser.c:352 (parse_*unixsockets* ()). I'd assume that they should be exclusive to each other in some way.
Comment 1 Daniel Novotny 2010-05-05 07:46:52 EDT
Created attachment 411555 [details]
proposed patch

a patch: when the first stat fails, we will not do the other one
Comment 2 Tim Landscheidt 2010-05-05 17:29:50 EDT
The patch works for me, thanks; still, the "relationship" between parse_file () and parse_unixsockets () seems very clumsy though.
Comment 3 Daniel Novotny 2010-05-18 08:21:56 EDT
fixed in rawhide: psmisc-22.6-14.fc14

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