Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154649 - start-stop-daemon() wrapper does not match behavior of actual start-stop-daemon when using long options
Summary: start-stop-daemon() wrapper does not match behavior of actual start-stop-daem...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-10 02:04 UTC by SpanKY
Modified: 2006-11-10 13:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emulate getopt_long (x,1.31 KB, patch)
2006-11-10 10:13 UTC, Roy Marples (RETIRED)
Details | Diff
emulate getopt_long (x,1.28 KB, patch)
2006-11-10 11:23 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2006-11-10 02:04:08 UTC
the start-stop-daemon binary accepts partial matches of long options because it uses the getopt_long() function which includes this behavior (and is not controllable) ... that means you can do:
ssd --pid <pidfile>
ssd --pidf <pidfile>
ssd --pidfi <pidfile>
ssd --pidfil <pidfile>
ssd --pidfile <pidfile>

but the start-stop-daemon() wrapper code only handles --pidfile

we need to either make the ssd wrapper code more flexible to match the behavior of the ssd binary, or make the wrapper code catch these partial matches and spit out an error so people know how to fix it ... the current behavior with 1.12.x is to fail silently while actually claiming it worked in some circumstances ;(
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-11-10 10:13:19 UTC
Created attachment 101614 [details, diff]
emulate getopt_long

This makes the wrapper parse the options like getopt_long
(patch applies to baselayout-1.13.0_alpha6)

I would prefer an exact name match, but heh.
Comment 2 Roy Marples (RETIRED) gentoo-dev 2006-11-10 11:23:03 UTC
Created attachment 101618 [details, diff]
emulate getopt_long

This one actually works :)
Comment 3 Roy Marples (RETIRED) gentoo-dev 2006-11-10 13:02:42 UTC
Fixed in baselayout-1.13.0_alpha7