Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #108166

Re: main()

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: main()
Date 2017-04-15 15:31 -0700
Organization None to speak of
Message-ID <lnh91ptiag.fsf@kst-u.example.com> (permalink)
References <ecUHA.285656$15.165152@fx07.am4> <dI3IA.10330$sn6.1876@fx44.iad> <bU3IA.457701$4n3.358291@fx14.am4> <f8634432-85fa-43f8-b4f6-37114705386b@googlegroups.com>

Show all headers | View raw


Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
[...]
> Exactly.
> envp is one of those things which probably should be in the standard but
> isn't, as many programs need the environment variables.

POSIX has `extern char **environ;`.  And of course standard C has
getenv(), which isn't as flexible (you can only get the value of an
environment variable if you already know its name, but that's usually
enough).

> Having said that, setting environment variables is a horrid thing to
> require of a user.

Balderdash.  (And in may cases, environment variables are set by the
environment, not explicitly by the user.)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

main() bartc <bc@freeuk.com> - 2017-04-14 00:53 +0100
  Re: main() Robert Wessel <robertwessel2@yahoo.com> - 2017-04-13 19:10 -0500
  Re: main() antispam@math.uni.wroc.pl - 2017-04-14 02:51 +0000
  Re: main() scott@slp53.sl.home (Scott Lurndal) - 2017-04-14 12:58 +0000
    Re: main() bartc <bc@freeuk.com> - 2017-04-14 14:11 +0100
      Re: main() Malcolm McLean <malcolm.mclean5@btinternet.com> - 2017-04-15 07:53 -0700
        Re: main() supercat@casperkitty.com - 2017-04-15 08:43 -0700
        Re: main() Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-04-15 16:50 +0100
        Re: main() Keith Thompson <kst-u@mib.org> - 2017-04-15 15:31 -0700
        Re: main() gordonb.y2etp@burditt.org (Gordon Burditt) - 2017-04-16 00:19 -0500
    The exec*() family (Was: main()) gazelle@shell.xmission.com (Kenny McCormack) - 2017-04-15 17:01 +0000
  Re: main() Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2017-04-14 10:04 -0400
    Re: main() bartc <bc@freeuk.com> - 2017-04-14 15:52 +0100
      Re: main() scott@slp53.sl.home (Scott Lurndal) - 2017-04-14 15:00 +0000
      Re: main() Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2017-04-14 13:49 -0400

csiph-web