Re: Finding out the active Unix shell



On Thu, 07 Jun 2007 09:07:54 -0000, in comp.lang.c , Tom Gur
<gur.tom@xxxxxxxxx> wrote:

Maybe I wasn't clear.
I'm writing a C program (a server) that runs a Java program (an agent)
with some arguments.
The agent's shell is unknown, so I need to check, within my C code
what kind of shell runs on the account that runs the agent.

The answer is unfortunatly still the same. You need to ask the
specialists in your os and /or compiler, since C itself has no
facilities for doing this. Most probably there's a function called
getenv() or something similar provided by your platform.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
.



Relevant Pages

  • Re: Finding out the active Unix shell
    ... I'm writing a C program that runs a Java program (an agent) ... The agent's shell is unknown, so I need to check, within my C code ... "Debugging is twice as hard as writing the code in the first place. ...
    (comp.lang.c)
  • Re: Finding out the active Unix shell
    ... I'm writing a C program that runs a Java program (an agent) ... The agent's shell is unknown, so I need to check, within my C code ... Please provide context when you post a followup; ...
    (comp.lang.c)
  • Re: Finding out the active Unix shell
    ... I'm writing a C program that runs a Java program (an agent) ... The agent's shell is unknown, so I need to check, within my C code ...
    (comp.lang.c)
  • Re: system() under ksh
    ... >> Technically you cannot do everything in shell. ... Try writing an SNMP ... > What prevents you from writing an SNMP agent in shell? ...
    (comp.unix.shell)
  • Re: Intro post now revisting failure( long)
    ... rejected by all the publishers you/your agent could think of to send it ... I've certainly had my agent ... If that's your main focus -- and IIRC, you said you got into writing in the ... Especially since I already know you're an intuitive writer. ...
    (rec.arts.sf.composition)