void main ()
{
  if (pledge ("stdio rpath cpath wpath fattr", NULL) == -1)
  {
    error (1, "pledge");
  }

  ...

}