Re: Invoking shell through a program and working on it interactively

sagar.borikar_at_gmail.com
Date: 04/11/05


Date: 10 Apr 2005 23:45:38 -0700


Basile Starynkevitch [news] wrote:
> On 2005-04-11, Tom_Punter <sagar.borikar@gmail.com> wrote:
> > Hello,
> >
> > I am facing a problem regarding invoking a shell and working with
it.
> > Following is the scenario.
> [...]
> > Can anybosy suggest me alternate solution?
>
> Directly using the fork(2) execve(2) dup(2) pipe(2) dup2(2) system
> calls (and the SIGCHLD signal).
>
> I suggest reading a good book on "Advanced Unix Programming" (like
> R.Stevens')
>
> If you need pseudo-ttys in your fork()-ed applications, things may
> become a bit more tricky. You might consider using the expect command
> interpreter (from the Tcl world).
>
> --
> Basile STARYNKEVITCH http://starynkevitch.net/Basile/
> email: basile<at>starynkevitch<dot>net
> aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
> 8, rue de la Faïencerie, 92340 Bourg La Reine, France



Relevant Pages

  • popen usage - bug in the code
    ... I am facing a problem in following piece of code.Actually I am trying ... to use popen for invoking other tasks. ... the interactive shell, I am not able to do further activities on the ... So when I try to set the config specs, ...
    (comp.os.linux.development.system)
  • Re: interactive programming
    ... >> I am facing a problem regarding invoking a shell and working ... Following is the scenario. ... commands to a shell with a C program, ...
    (comp.os.linux.misc)
  • Re: Posix Problems
    ... As you can see I have the HPPXUDC set and I am invoking the shell ... I desire to run vi from both the shell and from MPE so what do I ... * To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: Using shell commands versus C equivalents
    ... the shell command, but any area where code could be optimized is more ... There often are reasons to prefer using shell commands to C. ... This is, of course, not to try to claim that shell scripts are ... I commend to your attention Geoff Collyer and Henry Spencer's "C News" ...
    (freebsd-hackers)
  • Re: A 2nd nuke test by NK?
    ... news reports said. ... magnitude-6.0 earthquake shook northern Japan. ... couple of small nukes when we've been facing down both the Russians and ... Not "facing down" - kowtowing. ...
    (comp.sys.mac.advocacy)