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: Greg Wooledge
Subject: Re: how to force tty / input to be assigned , to a & backgrounded process , for fg just after varpid=$!
Date: Wed, 28 Aug 2024 13:16:00 -0400

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]