Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: null commands...

I wrote:
:Zefram wrote:
::>A lot of programs out there use the system() command on this, which on
::>most machines does "sh" "-c" "arguments".  So people strcat() the filename/s
::>onto the end of the PAGER var and just system() it.
::... which fails horribly when the filename contains any mildly unusual
::characters.  Any program that uses this method is broken.
:If you did: sprintf(buf, "%s '%s'", PAGER, filename) , what unusual
:characters would affect it besides ' ?  And people could check for special
:characters, like ' ,  and quote them in filename.
:Anyway, there are other reasons for not using system()

BTW, Zefram,  it's hard to mail back to you if the mail gets sent back to
the sender:

The original message was received at Mon, 28 Oct 1996 12:03:57 GMT
from root@mail []

   ----- The following addresses have delivery notifications -----
"|exec /dcs/94/zefram/etc/procmail/filter.mail"  (unrecoverable error)
    (expanded from: <zefram@xxxxxxxxxxxxxxxxxxxxxxx>)

   ----- Transcript of session follows -----
[... stuff deleted...]

554 "|exec /dcs/94/zefram/etc/procmail/filter.mail"... unknown mailer error 2

Geoff Wing [gwing@xxxxxxxxxxxxxxx]     PrimeNet - Internet Consultancy
  Web   : http://www.primenet.com.au/  Phone    : +61-3-9818 2977
  Mobile: 0412 162 441		       Facsimile: +61-3-9819 3788

Messages sorted by: Reverse Date, Date, Thread, Author