[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Reminder: $EDITOR with spaces?

From: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2002-04-29 20:17:12 CEST

Mark Benedetto King <bking@answerfriend.com> writes:

> No, you're wrong. The semantics are different. If the administrator
> expects execl() semantics they will be very suprised (and perhaps
> compromised) when they get system() semantics.

"execl() semantics" would mean not treating the space character as a
special character at all. So either you'd have to pass an array (not
possible with environment variables; they are just strings) or not be
able to give parameters to the program at all. The "split on space"
thing that has been suggested is neither "execl() semantics", nor
"system() semantics". So if somebody was really expecting execl()
semantics (which I doubt), they'd still get a surprise.

> All that said, +1 on using system() from me, too, because
> it *is* a lot more powerful than execl(), and because it's
> what people expect from $EDITOR.

Exactly. You are more likely to break peoples expectations by trying
to play big brother than by simply doing what everybody else does.

  // Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 29 20:21:16 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.