On 2016/01/15 14:42, Dmitrij D. Czarkoff wrote:
> Stuart Henderson said:
> > On 2016/01/15 13:36, Theo Buehler wrote:
> > > > + int main(int argc, char** argv)
> > > > + {
> > > > ++      if (pledge("stdio rpath ioctl", NULL) == -1) {
> > > > ++              fprintf ( stderr, "pdfgrep: pledge\n" );
> > > > ++              exit ( 1 );
> > > > ++      }
> > > 
> > > This ioctl pledge feels wrong.  I only have a lousy internet connection
> > > and no gcc 4.9 installed, so I can't really test.  The source shows only
> > > a TIOCGWINSZ ioctl, which is covered by pledge "tty" which makes much
> > > more sense to me.
> > > 
> > 
> > Ah yes you are right. I've adjusted it in my tree.
> 
> What is the point of this first pledge call?

It means that the list of available system calls is cut right down
before the first function calls into PCRE and Poppler, which I think
is nice to have.

I'm pleased to see that Poppler doesn't seem to be having problems
running with pledge for basic use. Hopefully this can be pushed out
into a full PDF viewer.

Reply via email to