Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Dec 2015 00:35:26 +0300
From:      Anton Sayetsky <vsasjason@gmail.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Re: PATH variable in lpd's process
Message-ID:  <CAA2O=b-P6rRoCtFMVHLJvdfMTEJR%2BGTKCDVFJjpGPbmxWogR9Q@mail.gmail.com>
In-Reply-To: <20151223213351.GA1304@becker.bs.l>
References:  <20151221164338.GB33124@becker.bs.l> <20151223213351.GA1304@becker.bs.l>

next in thread | previous in thread | raw e-mail | index | archive | help
23 =D0=B4=D0=B5=D0=BA. 2015 =D0=B3. 23:34 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=
=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "Bertram Scharpf" <
lists@bertram-scharpf.de> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>
> Hi,
>
> On Monday, 21. Dec 2015, 17:43:38 +0100, Bertram Scharpf wrote:
> > in my "/etc/printcap", the "if" field points to an input
> > filter I wrote in Ruby. There, the first line is a shebang
> > saying
> >
> >   #!/usr/bin/env ruby
> >
> > Further there is
> >
> >   # procstat -e `pgrep lpd`
> >     PID COMM             ENVIRONMENT
> >     940 lpd              PATH=3D/sbin:/bin:/usr/sbin:/usr/bin PWD=3D/
HOME=3D/ RC_PID=3D20
> >
> > As you can easily see, I will receive a mail saying the
> > print job failed because of
> >
> >   env: ruby: No such file or directory
> >
> > When I restart "lpd" from the command line, the new process
> > receives the environment variables from the shell process
> > and everything ist fine.
> >
> > [...]
> >
> > "/etc/crontab" allows to reset the PATH variable but I do
> > not see a way to do the same in "/etc/printcap".
>
> I decided unhesitatingly to extend the lpd printcap
> mechanism and I added a filter-path variable that will be
> put into the filter processes before calling exec there.
>
> I think this should be part of the official FreeBSD release.
> Where is the right place to propose it?
http://bugs.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAA2O=b-P6rRoCtFMVHLJvdfMTEJR%2BGTKCDVFJjpGPbmxWogR9Q>