Ticket #568 (closed defect: invalid)

Opened 11 years ago

Last modified 11 years ago

mit-lp isn't lp

Reported by: broder Owned by:
Priority: insignificant Milestone: The Distant Future
Component: printing Keywords:
Cc: Fixed in version:
Upstream bug:

Description

LPRng's lpr theoretically provides compatibility with a SysV-style lp command when invoked with argv[0] set to "lp". LPRng provides an lp -> lpr symlink for this reason, which we transform to mit-lp -> mit-lpr.

Of course, because we changed the name of the program, we don't trigger LPRng's detection of what it's running as:

Lines 414-417 from src/common/lpr.c in debathena-lprng:

        /* check to see if we simulate (poorly) the LP options */
        if( name && safestrcmp( name, "lp" ) == 0 ){
                LP_mode_JOB = 1;
        }

This detection is actually relevant for anybody using lp, beacuse lp uses -d to specify a print queue instead of -P.

This means you get screwed if you use our lp wrapper on an LPRng queue, which I'm sure nobody does.

Change History

comment:1 Changed 11 years ago by broder

  • Status changed from new to closed
  • Resolution set to invalid

And look at that - screwed again by not reading the code.

When our wrapper script exec's the CUPS- or LPRng-specific versions of a command, it leaves argv[0] set to the name of the command without the mit- or cups- prefix.

This means that mit-lp gets exec'd with argv set to ["lp", "-dbarbar"] or whatever.

See source:/trunk/debathena/config/printing-config/files/usr/bin/lpr.debathena@24384:91-101#L90

Note: See TracTickets for help on using tickets.