Hi Harald,
> Hm, I think if write(2, ...) fails, then we are out of luck anyway. We
> can't give an error message about being unable to give an error
> message. I thought that a successful call of write won't manipulate
> errno, but after rereading the documentation of errno it seems that
> one
> > > execlp (mhlproc, mhl, "-form", filter, "-noclear", NULL);
> > > - fprintf (stderr, "unable to exec ");
> > > - perror (mhlproc);
> > > + write(2, "unable to exec ", 15);
> >
> > Reminds me of Hollerith constants, i.e. having to manually count the
> > length of a string lite
Hi Harald,
> > > execlp (mhlproc, mhl, "-form", filter, "-noclear", NULL);
> > > - fprintf (stderr, "unable to exec ");
> > > - perror (mhlproc);
> > > + write(2, "unable to exec ", 15);
> >
> > Reminds me of Hollerith constants, i.e. having to manually count the
> > length of
> execlp (mhlproc, mhl, "-form", filter, "-noclear", NULL);
> - fprintf (stderr, "unable to exec ");
> - perror (mhlproc);
> + write(2, "unable to exec ", 15);
> + write(2, mhlproc, strlen(mhlproc));
> + write(2, strerror(errno), strlen(strerror(err
> > execlp (mhlproc, mhl, "-form", filter, "-noclear", NULL);
> > - fprintf (stderr, "unable to exec ");
> > - perror (mhlproc);
> > + write(2, "unable to exec ", 15);
>
> Reminds me of Hollerith constants, i.e. having to manually count the
> length of a string literal.
Hi,
> execlp (mhlproc, mhl, "-form", filter, "-noclear", NULL);
> - fprintf (stderr, "unable to exec ");
> - perror (mhlproc);
> + write(2, "unable to exec ", 15);
Reminds me of Hollerith constants, i.e. having to manually count the
length of a string literal.