help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to force tty / input to be assigned , to a & backgrounded proces


From: alex xmb sw ratchev
Subject: Re: how to force tty / input to be assigned , to a & backgrounded process , for fg just after varpid=$!
Date: Wed, 28 Aug 2024 21:05:34 +0200

i cant do else than bash and gawk
rephrasement of question : how to assure in a background spawned app ,
thats only spawnes to background to get its pid , for int , then fg ..
assure input to the spawned app

i may see an alternative
spawn app not in background but figure in a different codepart , to
determine pid otherhow ..

On Wed, Aug 28, 2024, 7:16 PM Greg Wooledge <greg@wooledge.org> wrote:

> On Wed, Aug 28, 2024 at 18:14:01 +0200, alex xmb sw ratchev wrote:
> > > there is a program , that when given no args , it goes into stdin mode
> > > in input mode , also in output mode , comtrol - c is used by this app ,
> > > for like abort-output-and-continue-input
> > >
> > > for this i gotta know the pid , to send int to
> > >
> > > so cmd & pid=$! ; fg
> > >
> > > my q is should i add something </dev/stdin to cmd ? to be ' more sure
> ' ?
>
> This sounds very much like the kind of application for which Expect
> was created.
>
> <https://www.nist.gov/services-resources/software/expect>
> <https://sourceforge.net/projects/expect/>
> <https://wiki.tcl-lang.org/page/Expect>
>
> Now, you're probably thinking something like, "But I don't need the full
> power of Expect.  All I need is to do X, Y and Z."
>
> X, Y and Z may be your needs *right now*, but they may not be your needs
> in the future.
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]