fuser exit codes (bug?)

sbremal@hotmail.com sbremal@hotmail.com
Wed Aug 26 19:23:00 GMT 2009


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



More information about the Cygwin mailing list