This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fuser exit codes (bug?)


Hello,

I wonder if the fuser utility coming with Cygwin is returning an error code that isn't in line with the IEEE specifaction. What is happening:

---

somogyib@demuc12306 ~
$ fuser /cygdrive/f/Bazsi/cygwin/bin/bash; echo $?
/cygdrive/f/Bazsi/cygwin/bin/bash:  2708e
0
somogyib@demuc12306 ~
$ fuser /cygdrive/f/Bazsi/cygwin/bin/awk; echo $?
1

---
 
So, the "bash" file is locked by one process and "awk" is by zero.

For both scenarios FreeBSD returns 0 which I assume to be correct. The IEEE standard says fuser should return non-zero value only when an error occured.
 
---

www.unix.org\single_unix_specification\susv3\utilities\fuser.html

EXIT STATUS
The following exit values shall be returned:
 0 
Successful completion. 
>0 
An error occurred.

---

A file being locked by one, two or ZERO process is all positive scenario so fuser should return 0. What's you opinion? Can this be fixed?

Cheers,
Balazs
_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.

http://www.microsoft.com/windows/windowslive/products/photos.aspx

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]