netstat command returns nozero even if successively executing
Bug #1251563 reported by
Vincent Hsu
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
net-tools (Debian) |
Fix Released
|
Unknown
|
|||
net-tools (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
for example:
in Ubuntu
$ netstat -s 1>/dev/null 2>&1 ; echo $?
1
in CentOS
$ netstat -s 1>/dev/null 2>&1 ; echo $?
0
My test environment is Ubuntu 12.04.03. "-s" is a existing argument to netstat, so it should be executed successively and return zero.
Changed in net-tools (Debian): | |
status: | Unknown → Fix Released |
To post a comment you must log in.
This seems to be done intentionally by the patch
debian/ patches/ netstat. c-assorted_ changes. patch
It explicitly changes exit(0) to exit(1) at the end of flag_sta handling. I have no idea why.